Commit ed6d6091d9231d06e6e284991dfae1950559d734
remove old ecc key deserialize
Henry committed on 10/2/2017, 12:34:50 AMParent: 8b52b7ecea8ab1b620f0792ae50a374a609b0434
Files changed
storage.js | changed |
storage.js | |||
---|---|---|---|
@@ -58,20 +58,8 @@ | |||
58 | 58 … | var keys = JSON.parse(privateKey) | |
59 | 59 … | if(!u.hasSigil(keys.id)) keys.id = '@' + keys.public | |
60 | 60 … | return keys | |
61 | 61 … | } catch (_) { console.error(_.stack) } | |
62 | - | ||
63 | - //else, reconstruct legacy curve... | ||
64 | - | ||
65 | - var curve = u.getTag(privateKey) | ||
66 | - | ||
67 | - if(curve !== 'k256') | ||
68 | - throw new Error('expected legacy curve (k256) but found:' + curve) | ||
69 | - | ||
70 | - var fool_browserify = require | ||
71 | - var ecc = fool_browserify('./eccjs') | ||
72 | - | ||
73 | - return u.keysToJSON(ecc.restore(u.toBuffer(privateKey)), 'k256') | ||
74 | 62 … | } | |
75 | 63 … | ||
76 | 64 … | exports.load = function(filename, cb) { | |
77 | 65 … | filename = toFile(filename, 'secret') |
Built with git-ssb-web