Eckey: renamed multiply to multiplyUncompressed for consistency

This commit is contained in:
olalonde 2014-05-08 08:10:07 +08:00
parent 7d33078736
commit e06e556ca3
4 changed files with 4 additions and 6 deletions

View File

@ -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).

View File

@ -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);
};

View File

@ -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;

View File

@ -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);