From d4cb1e4e1c2ea37ec88c10615d808fa2c69c4693 Mon Sep 17 00:00:00 2001 From: ieow Date: Fri, 1 Nov 2024 18:10:03 +0800 Subject: [PATCH] fix: test --- test/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index a0568ba..ffc6b2c 100644 --- a/test/test.js +++ b/test/test.js @@ -94,13 +94,13 @@ describe("ECDSA", function () { }); }); - it.skip("should reject promise on invalid key when verifying", function (done) { + it("should reject promise on invalid key when verifying", function (done) { eccrypto .sign(privateKey, msg) .then(function (sig) { eccrypto.verify(Buffer.from("test"), msg, sig).catch(function () { - const badKey = Buffer.alloc(65); - publicKey.copy(badKey); + const badKey = new Uint8Array(65); + badKey.set(publicKey); badKey[0] ^= 1; eccrypto.verify(badKey, msg, sig).catch(function () { done();