From 72e09f3c22dda67c171772496a225471421223b5 Mon Sep 17 00:00:00 2001 From: Bill Barman Date: Tue, 20 Nov 2018 17:27:17 +0800 Subject: [PATCH] find out the diff between python and js RSA signing --- src/libDDO/DDO.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libDDO/DDO.ts b/src/libDDO/DDO.ts index ae4b3cf..413306e 100644 --- a/src/libDDO/DDO.ts +++ b/src/libDDO/DDO.ts @@ -27,7 +27,10 @@ export default class DDO { // var signatureBuffer = new Buffer(signature, 'ascii') // var textBuffer = new Buffer(text, 'ascii') -// return key.hashAndVerify("sha256", text, signature, "utf8", false) + // FIXME: python does PKCS1_v1_5 padding, but this does not seem to be + // supported in ursa (only PKCS1_v1). + +// return key.hashAndVerify("sha256", text, signature, "utf8", ursa.RSA_NO_PADDING) /* // setup with SHA256 RSA