UNPKG

1.15 kBTypeScriptView Raw
1import type { BytesLike } from "../utils/index.js";
2/**
3 * Compute the cryptographic SHA2-256 hash of %%data%%.
4 *
5 * @_docloc: api/crypto:Hash Functions
6 * @returns DataHexstring
7 *
8 * @example:
9 * sha256("0x")
10 * //_result:
11 *
12 * sha256("0x1337")
13 * //_result:
14 *
15 * sha256(new Uint8Array([ 0x13, 0x37 ]))
16 * //_result:
17 *
18 */
19export declare function sha256(_data: BytesLike): string;
20export declare namespace sha256 {
21 var _: (data: Uint8Array) => Uint8Array;
22 var lock: () => void;
23 var register: (func: (data: Uint8Array) => BytesLike) => void;
24}
25/**
26 * Compute the cryptographic SHA2-512 hash of %%data%%.
27 *
28 * @_docloc: api/crypto:Hash Functions
29 * @returns DataHexstring
30 *
31 * @example:
32 * sha512("0x")
33 * //_result:
34 *
35 * sha512("0x1337")
36 * //_result:
37 *
38 * sha512(new Uint8Array([ 0x13, 0x37 ]))
39 * //_result:
40 */
41export declare function sha512(_data: BytesLike): string;
42export declare namespace sha512 {
43 var _: (data: Uint8Array) => Uint8Array;
44 var lock: () => void;
45 var register: (func: (data: Uint8Array) => BytesLike) => void;
46}
47//# sourceMappingURL=sha2.d.ts.map
\No newline at end of file