pull/17338/head
Elliott Johnson 8 months ago
parent 342ec99a05
commit 7a5886de7c

@ -4,5 +4,6 @@ let text_encoder;
export async function sha256(data) {
text_encoder ??= new TextEncoder();
const hash_buffer = await crypto.subtle.digest('SHA-256', text_encoder.encode(data));
// @ts-ignore - we don't install node types in the prod build
return Buffer.from(hash_buffer).toString('base64');
}

Loading…
Cancel
Save