diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index 9ffb8310..68fcf8ca 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -3,12 +3,14 @@ * Crypto utility. */ +import type { JSONValue } from './types' + type Algorithm = { name: string alias: string } -type Data = string | boolean | number | object | ArrayBufferView | ArrayBuffer +type Data = string | boolean | number | JSONValue | ArrayBufferView | ArrayBuffer export const sha256 = async (data: Data): Promise => { const algorithm: Algorithm = { name: 'SHA-256', alias: 'sha256' }