diff options
Diffstat (limited to 'packages/server/src/helpers/toHash.ts')
-rw-r--r-- | packages/server/src/helpers/toHash.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/server/src/helpers/toHash.ts b/packages/server/src/helpers/toHash.ts index 2f8dc30..90edd4e 100644 --- a/packages/server/src/helpers/toHash.ts +++ b/packages/server/src/helpers/toHash.ts @@ -5,7 +5,10 @@ import { isoUint8Array, isoCrypto } from './iso'; * Returns hash digest of the given data, using the given algorithm when provided. Defaults to using * SHA-256. */ -export async function toHash(data: Uint8Array | string, algorithm: COSEALG = -7): Promise<Uint8Array> { +export async function toHash( + data: Uint8Array | string, + algorithm: COSEALG = -7, +): Promise<Uint8Array> { if (typeof data === 'string') { data = isoUint8Array.fromUTF8String(data); } |