@types/libsodium-wrappers
Advanced tools
Comparing version 0.7.10 to 0.7.11
@@ -7,7 +7,7 @@ // Type definitions for libsodium-wrappers 0.7 | ||
export type Uint8ArrayOutputFormat = 'uint8array'; | ||
export type Uint8ArrayOutputFormat = "uint8array"; | ||
export type StringOutputFormat = 'text' | 'hex' | 'base64'; | ||
export type StringOutputFormat = "text" | "hex" | "base64"; | ||
export type KeyType = 'curve25519' | 'ed25519' | 'x25519'; | ||
export type KeyType = "curve25519" | "ed25519" | "x25519"; | ||
@@ -195,3 +195,4 @@ export enum base64_variants { | ||
export function crypto_aead_chacha20poly1305_decrypt_detached(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_decrypt_detached( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -204,3 +205,4 @@ mac: Uint8Array, | ||
): Uint8Array; | ||
export function crypto_aead_chacha20poly1305_decrypt_detached(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_decrypt_detached( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -214,3 +216,4 @@ mac: Uint8Array, | ||
export function crypto_aead_chacha20poly1305_encrypt(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_encrypt( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -222,3 +225,4 @@ secret_nonce: string | Uint8Array | null, | ||
): Uint8Array; | ||
export function crypto_aead_chacha20poly1305_encrypt(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_encrypt( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -231,3 +235,4 @@ secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_encrypt_detached(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_encrypt_detached( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -239,3 +244,4 @@ secret_nonce: string | Uint8Array | null, | ||
): CryptoBox; | ||
export function crypto_aead_chacha20poly1305_encrypt_detached(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_encrypt_detached( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -248,3 +254,4 @@ secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -256,3 +263,4 @@ additional_data: string | Uint8Array | null, | ||
): Uint8Array; | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -262,5 +270,7 @@ additional_data: string | Uint8Array | null, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat): string; | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt_detached(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt_detached( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -273,3 +283,4 @@ mac: Uint8Array, | ||
): Uint8Array; | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt_detached(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_ietf_decrypt_detached( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -280,5 +291,7 @@ mac: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat): string; | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -290,3 +303,4 @@ secret_nonce: string | Uint8Array | null, | ||
): Uint8Array; | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -299,3 +313,4 @@ secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt_detached(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt_detached( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -307,3 +322,4 @@ secret_nonce: string | Uint8Array | null, | ||
): CryptoBox; | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt_detached(message: string | Uint8Array, | ||
export function crypto_aead_chacha20poly1305_ietf_encrypt_detached( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -322,3 +338,4 @@ secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -330,3 +347,4 @@ additional_data: string | Uint8Array | null, | ||
): Uint8Array; | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -339,3 +357,4 @@ additional_data: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -348,3 +367,4 @@ mac: Uint8Array, | ||
): Uint8Array; | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached(secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached( | ||
secret_nonce: string | Uint8Array | null, | ||
ciphertext: string | Uint8Array, | ||
@@ -358,3 +378,4 @@ mac: Uint8Array, | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt(message: string | Uint8Array, | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -366,3 +387,4 @@ secret_nonce: string | Uint8Array | null, | ||
): Uint8Array; | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt(message: string | Uint8Array, | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -375,3 +397,4 @@ secret_nonce: string | Uint8Array | null, | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached(message: string | Uint8Array, | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -383,3 +406,4 @@ secret_nonce: string | Uint8Array | null, | ||
): CryptoBox; | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached(message: string | Uint8Array, | ||
export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached( | ||
message: string | Uint8Array, | ||
additional_data: string | Uint8Array | null, | ||
@@ -395,3 +419,7 @@ secret_nonce: string | Uint8Array | null, | ||
export function crypto_auth(message: string | Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_auth( | ||
message: string | Uint8Array, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_auth(message: string | Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; | ||
@@ -404,13 +432,55 @@ | ||
export function crypto_box_beforenm(publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_beforenm(publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_beforenm( | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_beforenm( | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_box_detached(message: string | Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): CryptoBox; | ||
export function crypto_box_detached(message: string | Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): StringCryptoBox; | ||
export function crypto_box_detached( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): CryptoBox; | ||
export function crypto_box_detached( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): StringCryptoBox; | ||
export function crypto_box_easy(message: string | Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_easy(message: string | Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_easy( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_easy( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_box_easy_afternm(message: string | Uint8Array, nonce: Uint8Array, sharedKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_easy_afternm(message: string | Uint8Array, nonce: Uint8Array, sharedKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_easy_afternm( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
sharedKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_easy_afternm( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
sharedKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -420,3 +490,4 @@ export function crypto_box_keypair(outputFormat?: Uint8ArrayOutputFormat | null): KeyPair; | ||
export function crypto_box_open_detached(ciphertext: string | Uint8Array, | ||
export function crypto_box_open_detached( | ||
ciphertext: string | Uint8Array, | ||
mac: Uint8Array, | ||
@@ -428,15 +499,62 @@ nonce: Uint8Array, | ||
): Uint8Array; | ||
export function crypto_box_open_detached(ciphertext: string | Uint8Array, mac: Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_open_detached( | ||
ciphertext: string | Uint8Array, | ||
mac: Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_box_open_easy(ciphertext: string | Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_open_easy(ciphertext: string | Uint8Array, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_open_easy( | ||
ciphertext: string | Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_open_easy( | ||
ciphertext: string | Uint8Array, | ||
nonce: Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_box_open_easy_afternm(ciphertext: string | Uint8Array, nonce: Uint8Array, sharedKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_open_easy_afternm(ciphertext: string | Uint8Array, nonce: Uint8Array, sharedKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_open_easy_afternm( | ||
ciphertext: string | Uint8Array, | ||
nonce: Uint8Array, | ||
sharedKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_open_easy_afternm( | ||
ciphertext: string | Uint8Array, | ||
nonce: Uint8Array, | ||
sharedKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_box_seal(message: string | Uint8Array, publicKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_seal(message: string | Uint8Array, publicKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_seal( | ||
message: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_seal( | ||
message: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_box_seal_open(ciphertext: string | Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_box_seal_open(ciphertext: string | Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_box_seal_open( | ||
ciphertext: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_box_seal_open( | ||
ciphertext: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -446,7 +564,25 @@ export function crypto_box_seed_keypair(seed: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): KeyPair; | ||
export function crypto_generichash(hash_length: number, message: string | Uint8Array, key?: string | Uint8Array | null, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_generichash(hash_length: number, message: string | Uint8Array, key: string | Uint8Array | null, outputFormat: StringOutputFormat): string; | ||
export function crypto_generichash( | ||
hash_length: number, | ||
message: string | Uint8Array, | ||
key?: string | Uint8Array | null, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_generichash( | ||
hash_length: number, | ||
message: string | Uint8Array, | ||
key: string | Uint8Array | null, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_generichash_final(state_address: StateAddress, hash_length: number, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_generichash_final(state_address: StateAddress, hash_length: number, outputFormat: StringOutputFormat): string; | ||
export function crypto_generichash_final( | ||
state_address: StateAddress, | ||
hash_length: number, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_generichash_final( | ||
state_address: StateAddress, | ||
hash_length: number, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -463,4 +599,16 @@ export function crypto_generichash_init(key: string | Uint8Array | null, hash_length: number): StateAddress; | ||
export function crypto_kdf_derive_from_key(subkey_len: number, subkey_id: number, ctx: string, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_kdf_derive_from_key(subkey_len: number, subkey_id: number, ctx: string, key: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_kdf_derive_from_key( | ||
subkey_len: number, | ||
subkey_id: number, | ||
ctx: string, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_kdf_derive_from_key( | ||
subkey_len: number, | ||
subkey_id: number, | ||
ctx: string, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -470,4 +618,14 @@ export function crypto_kdf_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_kx_client_session_keys(clientPublicKey: Uint8Array, clientSecretKey: Uint8Array, serverPublicKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): CryptoKX; | ||
export function crypto_kx_client_session_keys(clientPublicKey: Uint8Array, clientSecretKey: Uint8Array, serverPublicKey: Uint8Array, outputFormat: StringOutputFormat): StringCryptoKX; | ||
export function crypto_kx_client_session_keys( | ||
clientPublicKey: Uint8Array, | ||
clientSecretKey: Uint8Array, | ||
serverPublicKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): CryptoKX; | ||
export function crypto_kx_client_session_keys( | ||
clientPublicKey: Uint8Array, | ||
clientSecretKey: Uint8Array, | ||
serverPublicKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): StringCryptoKX; | ||
@@ -480,6 +638,17 @@ export function crypto_kx_keypair(outputFormat?: Uint8ArrayOutputFormat | null): KeyPair; | ||
export function crypto_kx_server_session_keys(serverPublicKey: Uint8Array, serverSecretKey: Uint8Array, clientPublicKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): CryptoKX; | ||
export function crypto_kx_server_session_keys(serverPublicKey: Uint8Array, serverSecretKey: Uint8Array, clientPublicKey: Uint8Array, outputFormat: StringOutputFormat): StringCryptoKX; | ||
export function crypto_kx_server_session_keys( | ||
serverPublicKey: Uint8Array, | ||
serverSecretKey: Uint8Array, | ||
clientPublicKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): CryptoKX; | ||
export function crypto_kx_server_session_keys( | ||
serverPublicKey: Uint8Array, | ||
serverSecretKey: Uint8Array, | ||
clientPublicKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): StringCryptoKX; | ||
export function crypto_pwhash(keyLength: number, | ||
export function crypto_pwhash( | ||
keyLength: number, | ||
password: string | Uint8Array, | ||
@@ -492,3 +661,11 @@ salt: Uint8Array, | ||
): Uint8Array; | ||
export function crypto_pwhash(keyLength: number, password: string | Uint8Array, salt: Uint8Array, opsLimit: number, memLimit: number, algorithm: number, outputFormat: StringOutputFormat): string; | ||
export function crypto_pwhash( | ||
keyLength: number, | ||
password: string | Uint8Array, | ||
salt: Uint8Array, | ||
opsLimit: number, | ||
memLimit: number, | ||
algorithm: number, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -501,13 +678,44 @@ export function crypto_pwhash_str(password: string | Uint8Array, opsLimit: number, memLimit: number): string; | ||
export function crypto_scalarmult(privateKey: Uint8Array, publicKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_scalarmult(privateKey: Uint8Array, publicKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_scalarmult( | ||
privateKey: Uint8Array, | ||
publicKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_scalarmult( | ||
privateKey: Uint8Array, | ||
publicKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_scalarmult_base(privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_scalarmult_base( | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_scalarmult_base(privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_secretbox_detached(message: string | Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): SecretBox; | ||
export function crypto_secretbox_detached(message: string | Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): StringSecretBox; | ||
export function crypto_secretbox_detached( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): SecretBox; | ||
export function crypto_secretbox_detached( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): StringSecretBox; | ||
export function crypto_secretbox_easy(message: string | Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_secretbox_easy(message: string | Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_secretbox_easy( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_secretbox_easy( | ||
message: string | Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -517,12 +725,40 @@ export function crypto_secretbox_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_secretbox_open_detached(ciphertext: string | Uint8Array, mac: Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_secretbox_open_detached(ciphertext: string | Uint8Array, mac: Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_secretbox_open_detached( | ||
ciphertext: string | Uint8Array, | ||
mac: Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_secretbox_open_detached( | ||
ciphertext: string | Uint8Array, | ||
mac: Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_secretbox_open_easy(ciphertext: string | Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_secretbox_open_easy(ciphertext: string | Uint8Array, nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_secretbox_open_easy( | ||
ciphertext: string | Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_secretbox_open_easy( | ||
ciphertext: string | Uint8Array, | ||
nonce: Uint8Array, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_secretstream_xchacha20poly1305_init_pull(header: Uint8Array, key: Uint8Array): StateAddress; | ||
export function crypto_secretstream_xchacha20poly1305_init_push(key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { state: StateAddress; header: Uint8Array }; | ||
export function crypto_secretstream_xchacha20poly1305_init_push(key: Uint8Array, outputFormat: StringOutputFormat): { state: StateAddress; header: string }; | ||
export function crypto_secretstream_xchacha20poly1305_init_push( | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): { state: StateAddress; header: Uint8Array }; | ||
export function crypto_secretstream_xchacha20poly1305_init_push( | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): { state: StateAddress; header: string }; | ||
@@ -532,3 +768,4 @@ export function crypto_secretstream_xchacha20poly1305_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_secretstream_xchacha20poly1305_pull(state_address: StateAddress, | ||
export function crypto_secretstream_xchacha20poly1305_pull( | ||
state_address: StateAddress, | ||
cipher: string | Uint8Array, | ||
@@ -538,3 +775,4 @@ ad?: string | Uint8Array | null, | ||
): MessageTag; | ||
export function crypto_secretstream_xchacha20poly1305_pull(state_address: StateAddress, | ||
export function crypto_secretstream_xchacha20poly1305_pull( | ||
state_address: StateAddress, | ||
cipher: string | Uint8Array, | ||
@@ -545,3 +783,4 @@ ad: string | Uint8Array | null, | ||
export function crypto_secretstream_xchacha20poly1305_push(state_address: StateAddress, | ||
export function crypto_secretstream_xchacha20poly1305_push( | ||
state_address: StateAddress, | ||
message_chunk: string | Uint8Array, | ||
@@ -552,3 +791,4 @@ ad: string | Uint8Array | null, | ||
): Uint8Array; | ||
export function crypto_secretstream_xchacha20poly1305_push(state_address: StateAddress, | ||
export function crypto_secretstream_xchacha20poly1305_push( | ||
state_address: StateAddress, | ||
message_chunk: string | Uint8Array, | ||
@@ -562,4 +802,12 @@ ad: string | Uint8Array | null, | ||
export function crypto_shorthash(message: string | Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_shorthash(message: string | Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_shorthash( | ||
message: string | Uint8Array, | ||
key: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_shorthash( | ||
message: string | Uint8Array, | ||
key: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -569,18 +817,52 @@ export function crypto_shorthash_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign(message: string | Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign(message: string | Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_sign( | ||
message: string | Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_sign( | ||
message: string | Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_sign_detached(message: string | Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign_detached(message: string | Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_sign_detached( | ||
message: string | Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_sign_detached( | ||
message: string | Uint8Array, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_sign_ed25519_pk_to_curve25519(edPk: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign_ed25519_pk_to_curve25519( | ||
edPk: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_sign_ed25519_pk_to_curve25519(edPk: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_sign_ed25519_sk_to_curve25519(edSk: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign_ed25519_sk_to_curve25519( | ||
edSk: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_sign_ed25519_sk_to_curve25519(edSk: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_sign_final_create(state_address: StateAddress, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign_final_create(state_address: StateAddress, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_sign_final_create( | ||
state_address: StateAddress, | ||
privateKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_sign_final_create( | ||
state_address: StateAddress, | ||
privateKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
export function crypto_sign_final_verify(state_address: StateAddress, signature: Uint8Array, publicKey: Uint8Array): boolean; | ||
export function crypto_sign_final_verify( | ||
state_address: StateAddress, | ||
signature: Uint8Array, | ||
publicKey: Uint8Array, | ||
): boolean; | ||
@@ -592,4 +874,12 @@ export function crypto_sign_init(): StateAddress; | ||
export function crypto_sign_open(signedMessage: string | Uint8Array, publicKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function crypto_sign_open(signedMessage: string | Uint8Array, publicKey: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function crypto_sign_open( | ||
signedMessage: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function crypto_sign_open( | ||
signedMessage: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -601,3 +891,7 @@ export function crypto_sign_seed_keypair(seed: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): KeyPair; | ||
export function crypto_sign_verify_detached(signature: Uint8Array, message: string | Uint8Array, publicKey: Uint8Array): boolean; | ||
export function crypto_sign_verify_detached( | ||
signature: Uint8Array, | ||
message: string | Uint8Array, | ||
publicKey: Uint8Array, | ||
): boolean; | ||
@@ -625,4 +919,12 @@ export function from_base64(input: string, variant?: base64_variants): Uint8Array; | ||
export function randombytes_buf_deterministic(length: number, seed: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; | ||
export function randombytes_buf_deterministic(length: number, seed: Uint8Array, outputFormat: StringOutputFormat): string; | ||
export function randombytes_buf_deterministic( | ||
length: number, | ||
seed: Uint8Array, | ||
outputFormat?: Uint8ArrayOutputFormat | null, | ||
): Uint8Array; | ||
export function randombytes_buf_deterministic( | ||
length: number, | ||
seed: Uint8Array, | ||
outputFormat: StringOutputFormat, | ||
): string; | ||
@@ -629,0 +931,0 @@ export function randombytes_close(): void; |
{ | ||
"name": "@types/libsodium-wrappers", | ||
"version": "0.7.10", | ||
"version": "0.7.11", | ||
"description": "TypeScript definitions for libsodium-wrappers", | ||
@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/libsodium-wrappers", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "e03898b53b0986e5045697229c53a7b708f901a2310c16f9ea132b7a21fee635", | ||
"typeScriptVersion": "4.1" | ||
"typesPublisherContentHash": "6aaa6fac17f2632a45a837ae8b7bbbc0751c0ade097bc52441b8d9902f1666d2", | ||
"typeScriptVersion": "4.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Wed, 05 Oct 2022 08:03:04 GMT | ||
* Last updated: Wed, 30 Aug 2023 19:35:05 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34220
794