diff options
author | 2023-01-31 17:55:16 -0800 | |
---|---|---|
committer | 2023-01-31 17:55:16 -0800 | |
commit | cc4326cd829decc95d1f1f23998f97705637e04b (patch) | |
tree | 9ccaa829b6d48af521d5e5fcdbabc0dac8d186af /test/bun.js/web-crypto.test.ts | |
parent | c57b37d29f9d04780c7f7917789cf8b424710d23 (diff) | |
download | bun-cc4326cd829decc95d1f1f23998f97705637e04b.tar.gz bun-cc4326cd829decc95d1f1f23998f97705637e04b.tar.zst bun-cc4326cd829decc95d1f1f23998f97705637e04b.zip |
Re-run prettier after changes
Diffstat (limited to 'test/bun.js/web-crypto.test.ts')
-rw-r--r-- | test/bun.js/web-crypto.test.ts | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/test/bun.js/web-crypto.test.ts b/test/bun.js/web-crypto.test.ts index 19d068180..d7afd523c 100644 --- a/test/bun.js/web-crypto.test.ts +++ b/test/bun.js/web-crypto.test.ts @@ -49,11 +49,7 @@ describe("Web Crypto", () => { async function signResponse(message, secret) { const key = await importKey(secret); - const signature = await crypto.subtle.sign( - "HMAC", - key, - new TextEncoder().encode(message), - ); + const signature = await crypto.subtle.sign("HMAC", key, new TextEncoder().encode(message)); // Convert ArrayBuffer to Base64 return btoa(String.fromCharCode(...new Uint8Array(signature))); @@ -63,14 +59,9 @@ describe("Web Crypto", () => { const key = await importKey(secret); // Convert Base64 to Uint8Array - const sigBuf = Uint8Array.from(atob(signature), (c) => c.charCodeAt(0)); + const sigBuf = Uint8Array.from(atob(signature), c => c.charCodeAt(0)); - return await crypto.subtle.verify( - "HMAC", - key, - sigBuf, - new TextEncoder().encode(message), - ); + return await crypto.subtle.verify("HMAC", key, sigBuf, new TextEncoder().encode(message)); } const msg = `hello world`; |