commit 06c7706358bf8f2cff60c3c356e9ecc9ad35cbdf
parent f5b2becb8529442bfbaa96e0a594863221b02e04
Author: finwo <finwo@pm.me>
Date: Mon, 15 Jul 2019 18:59:35 +0200
Added array support as buffer-like
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/index.js b/index.js
@@ -116,6 +116,8 @@ exports.verify = async function(signature, message, publicKey){
const fn = (await Module).exports;
const mem = (await Module).memory;
if ('string' === typeof message) message = Buffer.from(message);
+ if (Array.isArray(signature)) signature = Buffer.from(signature);
+ if (Array.isArray(publicKey)) publicKey = Buffer.from(publicKey);
await checkArguments({signature,message,publicKey});
var messageLen = message.length;
diff --git a/package.json b/package.json
@@ -6,7 +6,8 @@
"homepage": "http://git.finwo.net/supercop-js",
"scripts": {
"test": "node test.js",
- "postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]') && npm deprecate \"supercop@<${PACKAGE_VERSION}\" \"Rolling release, please update to ${PACKAGE_VERSION}\""
+ "postpublish": "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{print $2}' | sed 's/[\",]//g' | tr -d '[[:space:]]') && npm deprecate \"supercop@<${PACKAGE_VERSION}\" \"Rolling release, please update to ${PACKAGE_VERSION}\"",
+ "build": "./build.sh"
},
"repository": {
"type": "git",