How to use the ecc function from crypto

Find comprehensive JavaScript crypto.ecc code examples handpicked from public code repositorys.

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){
fork icon11
star icon78
watch icon20

+ 13 other calls in file