1// @needsAudit 2/** 3 * [`Cryptographic hash function`](https://developer.mozilla.org/en-US/docs/Glossary/Cryptographic_hash_function) 4 */ 5export enum CryptoDigestAlgorithm { 6 /** 7 * `160` bits. 8 */ 9 SHA1 = 'SHA-1', 10 /** 11 * `256` bits. Collision Resistant. 12 */ 13 SHA256 = 'SHA-256', 14 /** 15 * `384` bits. Collision Resistant. 16 */ 17 SHA384 = 'SHA-384', 18 /** 19 * `512` bits. Collision Resistant. 20 */ 21 SHA512 = 'SHA-512', 22 /** 23 * `128` bits. 24 * @platform ios 25 */ 26 MD2 = 'MD2', 27 /** 28 * `128` bits. 29 * @platform ios 30 */ 31 MD4 = 'MD4', 32 /** 33 * `128` bits. 34 * @platform android 35 * @platform ios 36 */ 37 MD5 = 'MD5', 38} 39 40// @needsAudit 41export enum CryptoEncoding { 42 HEX = 'hex', 43 /** 44 * Has trailing padding. Does not wrap lines. Does not have a trailing newline. 45 */ 46 BASE64 = 'base64', 47} 48 49// @needsAudit 50export type CryptoDigestOptions = { 51 /** 52 * Format the digest is returned in. 53 */ 54 encoding: CryptoEncoding; 55}; 56 57// @docsMissing 58export type Digest = string; 59