This repository has been archived by the owner on Feb 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.d.ts
71 lines (59 loc) · 2.65 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
export const crypto_pwhash_ALG_ARGON2I13: number;
export const crypto_pwhash_ALG_ARGON2ID13: number;
export const crypto_pwhash_ALG_DEFAULT: number;
export const crypto_pwhash_BYTES_MAX: number;
export const crypto_pwhash_BYTES_MIN: number;
export const crypto_pwhash_MEMLIMIT_INTERACTIVE: number;
export const crypto_pwhash_MEMLIMIT_MAX: number;
export const crypto_pwhash_MEMLIMIT_MIN: number;
export const crypto_pwhash_MEMLIMIT_MODERATE: number;
export const crypto_pwhash_MEMLIMIT_SENSITIVE: number;
export const crypto_pwhash_OPSLIMIT_INTERACTIVE: number;
export const crypto_pwhash_OPSLIMIT_MAX: number;
export const crypto_pwhash_OPSLIMIT_MIN: number;
export const crypto_pwhash_OPSLIMIT_MODERATE: number;
export const crypto_pwhash_OPSLIMIT_SENSITIVE: number;
export const crypto_pwhash_PASSWD_MAX: number;
export const crypto_pwhash_PASSWD_MIN: number;
export const crypto_pwhash_SALTBYTES: number;
export const crypto_pwhash_STR_VERIFY: number;
export const crypto_pwhash_STRBYTES: number;
export const crypto_pwhash_STRPREFIX: string;
export const crypto_aead_xchacha20poly1305_IETF_ABYTES: number;
export const crypto_aead_xchacha20poly1305_IETF_KEYBYTES: number;
export const crypto_aead_xchacha20poly1305_IETF_NPUBBYTES: number;
export const crypto_aead_xchacha20poly1305_IETF_NSECBYTES: number;
export const randombytes_SEEDBYTES: number;
export const base64_variant_ORIGINAL: number;
export const base64_variant_VARIANT_ORIGINAL_NO_PADDING: number;
export const base64_variant_VARIANT_URLSAFE: number;
export const base64_variant_VARIANT_URLSAFE_NO_PADDING: number;
export function crypto_auth(message: string, key: string): Promise<string>;
export function crypto_pwhash(
keyLength: number,
password: string,
salt: string,
opsLimit: number,
memLimit: number,
algorithm: number
): Promise<string>;
export function crypto_aead_xchacha20poly1305_ietf_encrypt(
message: string,
public_nonce: string,
key: string,
additional_data: string | null
): Promise<string>;
export function crypto_aead_xchacha20poly1305_ietf_decrypt(
cipherText: string,
public_nonce: string,
key: string,
additional_data: string | null
): Promise<string>;
export function crypto_aead_xchacha20poly1305_ietf_keygen(): Promise<string>;
export function randombytes_buf(length: number): Promise<string>;
export function randombytes_random(): Promise<number>;
export function sodium_version_string(): Promise<string>;
export function to_base64(message: string, variant: number): Promise<string>;
export function from_base64(cipher: string, variant: number): Promise<string>;
export function to_hex(message: string): Promise<string>;
export function from_hex(cipher: string): Promise<string>;