Fix HMAC verification wrong reference to window
This commit is contained in:
@@ -21,11 +21,7 @@ export async function createHmac({ key, data }: { key: string; data: string }) {
|
||||
['sign', 'verify'],
|
||||
);
|
||||
|
||||
const signature = await window.crypto.subtle.sign(
|
||||
'HMAC',
|
||||
hmacKey,
|
||||
encodedData,
|
||||
);
|
||||
const signature = await crypto.subtle.sign('HMAC', hmacKey, encodedData);
|
||||
|
||||
const hex = bufferToHex(signature);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user