How to use the ecc function from crypto
Find comprehensive JavaScript crypto.ecc code examples handpicked from public code repositorys.
GitHub: telehash/e3x-js
75 76 77 78 79 80 81 82 83 84
exports._Local = function(pair) { var self = this; try{ self.key = new NodeCrypto.ecc.ECKey(NodeCrypto.ecc.ECCurves.secp160r1, pair.key, true); self.secret = new NodeCrypto.ecc.ECKey(NodeCrypto.ecc.ECCurves.secp160r1, pair.secret); if(self.key.PublicKey.toString() != pair.key.toString()) throw new Error('invalid public key data'); if(self.secret.PrivateKey.toString() != pair.secret.toString()) throw new Error('invalid secret key data'); }catch(E){
11
78
20
+ 13 other calls in file
crypto.createHash is the most popular function in crypto (882 examples)