Skip to content

Commit

Permalink
Private Key 0..0 is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
D4nte committed May 9, 2022
1 parent 1ca7215 commit 1fd3263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lib/waku_message/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("Waku Message: Browser & Node", function () {
await fc.assert(
fc.asyncProperty(
fc.uint8Array({ minLength: 1 }),
fc.uint8Array({ minLength: 32, maxLength: 32 }),
fc.uint8Array({ min: 1, minLength: 32, maxLength: 32 }),
async (payload, key) => {
const publicKey = getPublicKey(key);

Expand All @@ -56,8 +56,8 @@ describe("Waku Message: Browser & Node", function () {
await fc.assert(
fc.asyncProperty(
fc.uint8Array({ minLength: 1 }),
fc.uint8Array({ minLength: 32, maxLength: 32, min: 1 }),
fc.uint8Array({ minLength: 32, maxLength: 32, min: 1 }),
fc.uint8Array({ min: 1, minLength: 32, maxLength: 32 }),
fc.uint8Array({ min: 1, minLength: 32, maxLength: 32 }),
async (payload, sigPrivKey, encPrivKey) => {
const sigPubKey = getPublicKey(sigPrivKey);
const encPubKey = getPublicKey(encPrivKey);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/waku_message/version_1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Waku Message Version 1", function () {
await fc.assert(
fc.asyncProperty(
fc.uint8Array({ minLength: 1 }),
fc.uint8Array({ minLength: 32, maxLength: 32 }),
fc.uint8Array({ min: 1, minLength: 32, maxLength: 32 }),
async (message, privKey) => {
const publicKey = getPublicKey(privKey);

Expand Down

0 comments on commit 1fd3263

Please sign in to comment.