add authentication via new Message core class

This commit is contained in:
Ryan X. Charles 2014-06-26 08:49:22 -07:00
commit 543c42a6a8
9 changed files with 226 additions and 23 deletions

View file

@ -32,9 +32,17 @@ PrivateKey.prototype.getIdPriv = function() {
return this.idpriv;
};
PrivateKey.prototype.getIdKey = function() {
if (!this.idkey) {
this.cacheId();
}
return this.idkey;
};
PrivateKey.prototype.cacheId = function() {
var path = Structure.IdFullBranch;
var idhk = this.bip.derive(path);
this.idkey = idhk.eckey;
this.id = idhk.eckey.public.toString('hex');
this.idpriv = idhk.eckey.private.toString('hex');
};