Skip to content

Commit

Permalink
fix pbkdf2 deriveBits tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boorad committed Jan 28, 2024
1 parent 2215b9e commit ce02224
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/src/testing/Tests/webcryptoTests/webcryptoTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ function arrayBufferToBase64(buffer: ArrayBuffer) {
return btoa(binary);
}

function ab2str(buf: ArrayBuffer) {
return Buffer.from(buf).toString('hex');
}

export const registerWebcryptoTests = () => {};

describe('webcrypto', () => {
Expand Down Expand Up @@ -117,7 +121,7 @@ describe('webcrypto', () => {
key,
length
);
const pbkdf2Key = arrayBufferToBase64(bits);
const pbkdf2Key = ab2str(bits);
expect(pbkdf2Key).to.equal(expected);
};

Expand Down

0 comments on commit ce02224

Please sign in to comment.