diff --git a/index.js b/index.js index a34a77d..f0a6f30 100644 --- a/index.js +++ b/index.js @@ -185,9 +185,7 @@ module.exports = { // let naclPubkey = nacl.sign.keyPair.fromSeed() }else { // 默认使用 eccrypto try { - await eccrypto.verify(Buffer.from(pubkey, 'hex'), - this.hash(data, {output:'buf'}, - Buffer.from(signature, 'hex')) // 如果给signature添加1位hex,eccrypto 的 verify结果也是true! 估计因为一位hex不被转成字节。 + await eccrypto.verify(Buffer.from(pubkey, 'hex'), this.hash(data, {output:'buf'}), Buffer.from(signature, 'hex')) // 如果给signature添加1位hex,eccrypto 的 verify结果也是true! 估计因为一位hex不被转成字节。 return true }catch(exception){ return false