Skip to content

Commit

Permalink
Merge pull request #10 from OpenSecretCloud/fix-signing-test
Browse files Browse the repository at this point in the history
Fix signing test to have a bigger sig range
  • Loading branch information
AnthonyRonning authored Dec 6, 2024
2 parents 9c721f4 + b9dd464 commit d97ff42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/signing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test("Sign message with ECDSA returns valid signature", async () => {
expect(typeof response.message_hash).toBe("string");

// Verify hex format and lengths
expect(response.signature).toMatch(/^[0-9a-f]{140,144}$/i); // 70-72 bytes in DER format
expect(response.signature).toMatch(/^[0-9a-f]{130,144}$/i); // Adjust range to include shorter valid signatures
expect(response.message_hash).toMatch(/^[0-9a-f]{64}$/i); // 32 bytes = 64 hex chars

// Verify the hash matches our local hash
Expand Down

0 comments on commit d97ff42

Please sign in to comment.