UNPKG

660 BTypeScriptView Raw
1export declare enum CryptoDigestAlgorithm {
2 /**
3 * SHA1 is vulnerable and should not be used.
4 * https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#SHA-1
5 */
6 SHA1 = "SHA-1",
7 SHA256 = "SHA-256",
8 SHA384 = "SHA-384",
9 SHA512 = "SHA-512",
10 /**
11 * MD* is not supported on web.
12 * message-digest algorithms shouldn't be used for creating secure digests.
13 */
14 MD2 = "MD2",
15 MD4 = "MD4",
16 MD5 = "MD5"
17}
18export declare enum CryptoEncoding {
19 HEX = "hex",
20 BASE64 = "base64"
21}
22export declare type CryptoDigestOptions = {
23 encoding: CryptoEncoding;
24};
25export declare type Digest = string;