Eckey: renamed multiply to multiplyUncompressed for consistency
This commit is contained in:
parent
7d33078736
commit
e06e556ca3
|
@ -4,8 +4,6 @@ var Point = require('./Point'),
|
|||
sha256 = require('../util').sha256,
|
||||
twoSha256 = require('../util').twoSha256;
|
||||
|
||||
// TODO: use native modules instead of browser libraries
|
||||
|
||||
/**
|
||||
* For now, this class can only supports derivation from public key
|
||||
* It doesn't support private key derivation (TODO).
|
||||
|
|
|
@ -21,7 +21,7 @@ Point.add = function(p1, p2) {
|
|||
|
||||
Point.multiply = function(p1, x) {
|
||||
var u1 = p1.toUncompressedPubKey();
|
||||
var pubKey = CPPKey.multiply(u1, x);
|
||||
var pubKey = CPPKey.multiplyUncompressed(u1, x);
|
||||
return Point.fromUncompressedPubKey(pubKey);
|
||||
};
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ void Key::Init(Handle<Object> target)
|
|||
NODE_SET_METHOD(s_ct->GetFunction(), "generateSync", GenerateSync);
|
||||
NODE_SET_METHOD(s_ct->GetFunction(), "fromDER", FromDER);
|
||||
NODE_SET_METHOD(s_ct->GetFunction(), "addUncompressed", AddUncompressed);
|
||||
NODE_SET_METHOD(s_ct->GetFunction(), "multiply", Multiply);
|
||||
NODE_SET_METHOD(s_ct->GetFunction(), "multiplyUncompressed", MultiplyUncompressed);
|
||||
|
||||
target->Set(String::NewSymbol("Key"),
|
||||
s_ct->GetFunction());
|
||||
|
@ -488,7 +488,7 @@ Key::AddUncompressed(const Arguments& args)
|
|||
}
|
||||
|
||||
Handle<Value>
|
||||
Key::Multiply(const Arguments& args)
|
||||
Key::MultiplyUncompressed(const Arguments& args)
|
||||
{
|
||||
HandleScope scope;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public:
|
|||
AddUncompressed(const Arguments& args);
|
||||
|
||||
static Handle<Value>
|
||||
Multiply(const Arguments& args);
|
||||
MultiplyUncompressed(const Arguments& args);
|
||||
|
||||
static Handle<Value>
|
||||
VerifySignature(const Arguments& args);
|
||||
|
|
Loading…
Reference in New Issue