UNPKG

@utilify/crypto

Version:

These functions are useful for ensuring data security and integrity in web and back-end applications.

10 lines (6 loc) 390 B
declare function djb2(str: string): string; type Algorithm = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512'; type HashOutput = 'hex' | 'base64' | 'buffer'; declare function hash(data: string | ArrayBuffer | DataView, algorithm: Algorithm, output?: HashOutput): Promise<string | ArrayBuffer | undefined>; declare function randomUUID(): string | undefined; export { djb2, hash, randomUUID };