From e06e556ca34cd7d134f4af27ba161f357bbf219a Mon Sep 17 00:00:00 2001 From: olalonde Date: Thu, 8 May 2014 08:10:07 +0800 Subject: [PATCH] Eckey: renamed multiply to multiplyUncompressed for consistency --- lib/Armory.js | 2 -- lib/Point.js | 2 +- src/eckey.cc | 4 ++-- src/eckey.h | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Armory.js b/lib/Armory.js index e78ab33..1b9be60 100644 --- a/lib/Armory.js +++ b/lib/Armory.js @@ -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). diff --git a/lib/Point.js b/lib/Point.js index 9231192..3864b80 100644 --- a/lib/Point.js +++ b/lib/Point.js @@ -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); }; diff --git a/src/eckey.cc b/src/eckey.cc index 3f6926a..02329f9 100644 --- a/src/eckey.cc +++ b/src/eckey.cc @@ -124,7 +124,7 @@ void Key::Init(Handle 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 -Key::Multiply(const Arguments& args) +Key::MultiplyUncompressed(const Arguments& args) { HandleScope scope; diff --git a/src/eckey.h b/src/eckey.h index 2507654..df447ba 100644 --- a/src/eckey.h +++ b/src/eckey.h @@ -90,7 +90,7 @@ public: AddUncompressed(const Arguments& args); static Handle - Multiply(const Arguments& args); + MultiplyUncompressed(const Arguments& args); static Handle VerifySignature(const Arguments& args);