UNPKG

libsodium-wrappers

Version:

The Sodium cryptographic library compiled to pure JavaScript (wrappers)

803 lines (794 loc) 129 kB
// TypeScript definitions for libsodium-wrappers // Auto-generated - do not edit manually /** * Promise that resolves when the library is ready to use. * All crypto operations must wait for this promise to resolve. */ export const ready: Promise<void>; export type StateAddress = { name: string; address: number; }; export const base64_variants: { ORIGINAL: number; ORIGINAL_NO_PADDING: number; URLSAFE: number; URLSAFE_NO_PADDING: number; }; export type base64_variants = number; export const output_formats: string[]; export type Uint8ArrayOutputFormat = "uint8array"; export type StringOutputFormat = "text" | "hex" | "base64"; export function from_base64(input: string, variant?: base64_variants): Uint8Array; export function to_base64(input: Uint8Array | string, variant?: base64_variants): string; export function from_hex(input: string): Uint8Array; export function to_hex(input: Uint8Array | string): string; export function from_string(input: string): Uint8Array; export function to_string(input: Uint8Array): string; export function pad(buf: Uint8Array, blocksize: number): Uint8Array; export function unpad(buf: Uint8Array, blocksize: number): Uint8Array; export function memcmp(b1: Uint8Array, b2: Uint8Array): boolean; export function memzero(bytes: Uint8Array): void; export function increment(bytes: Uint8Array): void; export function add(a: Uint8Array, b: Uint8Array): void; export function compare(b1: Uint8Array, b2: Uint8Array): number; export function is_zero(bytes: Uint8Array): boolean; // Constants export const SODIUM_LIBRARY_VERSION_MAJOR: number; export const SODIUM_LIBRARY_VERSION_MINOR: number; export const SODIUM_VERSION_STRING: string; export const crypto_aead_aegis128l_ABYTES: number; export const crypto_aead_aegis128l_KEYBYTES: number; export const crypto_aead_aegis128l_MESSAGEBYTES_MAX: number; export const crypto_aead_aegis128l_NPUBBYTES: number; export const crypto_aead_aegis128l_NSECBYTES: number; export const crypto_aead_aegis256_ABYTES: number; export const crypto_aead_aegis256_KEYBYTES: number; export const crypto_aead_aegis256_MESSAGEBYTES_MAX: number; export const crypto_aead_aegis256_NPUBBYTES: number; export const crypto_aead_aegis256_NSECBYTES: number; export const crypto_aead_aes256gcm_ABYTES: number; export const crypto_aead_aes256gcm_KEYBYTES: number; export const crypto_aead_aes256gcm_MESSAGEBYTES_MAX: number; export const crypto_aead_aes256gcm_NPUBBYTES: number; export const crypto_aead_aes256gcm_NSECBYTES: number; export const crypto_aead_chacha20poly1305_ABYTES: number; export const crypto_aead_chacha20poly1305_IETF_ABYTES: number; export const crypto_aead_chacha20poly1305_IETF_KEYBYTES: number; export const crypto_aead_chacha20poly1305_IETF_MESSAGEBYTES_MAX: number; export const crypto_aead_chacha20poly1305_IETF_NPUBBYTES: number; export const crypto_aead_chacha20poly1305_IETF_NSECBYTES: number; export const crypto_aead_chacha20poly1305_KEYBYTES: number; export const crypto_aead_chacha20poly1305_MESSAGEBYTES_MAX: number; export const crypto_aead_chacha20poly1305_NPUBBYTES: number; export const crypto_aead_chacha20poly1305_NSECBYTES: number; export const crypto_aead_chacha20poly1305_ietf_ABYTES: number; export const crypto_aead_chacha20poly1305_ietf_KEYBYTES: number; export const crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX: number; export const crypto_aead_chacha20poly1305_ietf_NPUBBYTES: number; export const crypto_aead_chacha20poly1305_ietf_NSECBYTES: number; export const crypto_aead_xchacha20poly1305_IETF_ABYTES: number; export const crypto_aead_xchacha20poly1305_IETF_KEYBYTES: number; export const crypto_aead_xchacha20poly1305_IETF_MESSAGEBYTES_MAX: number; export const crypto_aead_xchacha20poly1305_IETF_NPUBBYTES: number; export const crypto_aead_xchacha20poly1305_IETF_NSECBYTES: number; export const crypto_aead_xchacha20poly1305_ietf_ABYTES: number; export const crypto_aead_xchacha20poly1305_ietf_KEYBYTES: number; export const crypto_aead_xchacha20poly1305_ietf_MESSAGEBYTES_MAX: number; export const crypto_aead_xchacha20poly1305_ietf_NPUBBYTES: number; export const crypto_aead_xchacha20poly1305_ietf_NSECBYTES: number; export const crypto_auth_BYTES: number; export const crypto_auth_KEYBYTES: number; export const crypto_auth_hmacsha256_BYTES: number; export const crypto_auth_hmacsha256_KEYBYTES: number; export const crypto_auth_hmacsha512256_BYTES: number; export const crypto_auth_hmacsha512256_KEYBYTES: number; export const crypto_auth_hmacsha512_BYTES: number; export const crypto_auth_hmacsha512_KEYBYTES: number; export const crypto_box_BEFORENMBYTES: number; export const crypto_box_MACBYTES: number; export const crypto_box_MESSAGEBYTES_MAX: number; export const crypto_box_NONCEBYTES: number; export const crypto_box_PUBLICKEYBYTES: number; export const crypto_box_SEALBYTES: number; export const crypto_box_SECRETKEYBYTES: number; export const crypto_box_SEEDBYTES: number; export const crypto_box_curve25519xchacha20poly1305_BEFORENMBYTES: number; export const crypto_box_curve25519xchacha20poly1305_MACBYTES: number; export const crypto_box_curve25519xchacha20poly1305_MESSAGEBYTES_MAX: number; export const crypto_box_curve25519xchacha20poly1305_NONCEBYTES: number; export const crypto_box_curve25519xchacha20poly1305_PUBLICKEYBYTES: number; export const crypto_box_curve25519xchacha20poly1305_SEALBYTES: number; export const crypto_box_curve25519xchacha20poly1305_SECRETKEYBYTES: number; export const crypto_box_curve25519xchacha20poly1305_SEEDBYTES: number; export const crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES: number; export const crypto_box_curve25519xsalsa20poly1305_MACBYTES: number; export const crypto_box_curve25519xsalsa20poly1305_MESSAGEBYTES_MAX: number; export const crypto_box_curve25519xsalsa20poly1305_NONCEBYTES: number; export const crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES: number; export const crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES: number; export const crypto_box_curve25519xsalsa20poly1305_SEEDBYTES: number; export const crypto_core_ed25519_BYTES: number; export const crypto_core_ed25519_HASHBYTES: number; export const crypto_core_ed25519_NONREDUCEDSCALARBYTES: number; export const crypto_core_ed25519_SCALARBYTES: number; export const crypto_core_ed25519_UNIFORMBYTES: number; export const crypto_core_hchacha20_CONSTBYTES: number; export const crypto_core_hchacha20_INPUTBYTES: number; export const crypto_core_hchacha20_KEYBYTES: number; export const crypto_core_hchacha20_OUTPUTBYTES: number; export const crypto_core_hsalsa20_CONSTBYTES: number; export const crypto_core_hsalsa20_INPUTBYTES: number; export const crypto_core_hsalsa20_KEYBYTES: number; export const crypto_core_hsalsa20_OUTPUTBYTES: number; export const crypto_core_ristretto255_BYTES: number; export const crypto_core_ristretto255_HASHBYTES: number; export const crypto_core_ristretto255_NONREDUCEDSCALARBYTES: number; export const crypto_core_ristretto255_SCALARBYTES: number; export const crypto_core_salsa2012_CONSTBYTES: number; export const crypto_core_salsa2012_INPUTBYTES: number; export const crypto_core_salsa2012_KEYBYTES: number; export const crypto_core_salsa2012_OUTPUTBYTES: number; export const crypto_core_salsa208_CONSTBYTES: number; export const crypto_core_salsa208_INPUTBYTES: number; export const crypto_core_salsa208_KEYBYTES: number; export const crypto_core_salsa208_OUTPUTBYTES: number; export const crypto_core_salsa20_CONSTBYTES: number; export const crypto_core_salsa20_INPUTBYTES: number; export const crypto_core_salsa20_KEYBYTES: number; export const crypto_core_salsa20_OUTPUTBYTES: number; export const crypto_generichash_BYTES: number; export const crypto_generichash_BYTES_MAX: number; export const crypto_generichash_BYTES_MIN: number; export const crypto_generichash_KEYBYTES: number; export const crypto_generichash_KEYBYTES_MAX: number; export const crypto_generichash_KEYBYTES_MIN: number; export const crypto_generichash_blake2b_BYTES: number; export const crypto_generichash_blake2b_BYTES_MAX: number; export const crypto_generichash_blake2b_BYTES_MIN: number; export const crypto_generichash_blake2b_KEYBYTES: number; export const crypto_generichash_blake2b_KEYBYTES_MAX: number; export const crypto_generichash_blake2b_KEYBYTES_MIN: number; export const crypto_generichash_blake2b_PERSONALBYTES: number; export const crypto_generichash_blake2b_SALTBYTES: number; export const crypto_hash_BYTES: number; export const crypto_hash_sha256_BYTES: number; export const crypto_hash_sha3256_BYTES: number; export const crypto_hash_sha3512_BYTES: number; export const crypto_hash_sha512_BYTES: number; export const crypto_ipcrypt_BYTES: number; export const crypto_ipcrypt_KEYBYTES: number; export const crypto_ipcrypt_ND_INPUTBYTES: number; export const crypto_ipcrypt_ND_KEYBYTES: number; export const crypto_ipcrypt_ND_OUTPUTBYTES: number; export const crypto_ipcrypt_ND_TWEAKBYTES: number; export const crypto_ipcrypt_NDX_INPUTBYTES: number; export const crypto_ipcrypt_NDX_KEYBYTES: number; export const crypto_ipcrypt_NDX_OUTPUTBYTES: number; export const crypto_ipcrypt_NDX_TWEAKBYTES: number; export const crypto_ipcrypt_PFX_BYTES: number; export const crypto_ipcrypt_PFX_KEYBYTES: number; export const crypto_kdf_BYTES_MAX: number; export const crypto_kdf_BYTES_MIN: number; export const crypto_kdf_CONTEXTBYTES: number; export const crypto_kdf_KEYBYTES: number; export const crypto_kdf_blake2b_BYTES_MAX: number; export const crypto_kdf_blake2b_BYTES_MIN: number; export const crypto_kdf_blake2b_CONTEXTBYTES: number; export const crypto_kdf_blake2b_KEYBYTES: number; export const crypto_kdf_hkdf_sha256_BYTES_MAX: number; export const crypto_kdf_hkdf_sha256_BYTES_MIN: number; export const crypto_kdf_hkdf_sha256_KEYBYTES: number; export const crypto_kdf_hkdf_sha512_BYTES_MAX: number; export const crypto_kdf_hkdf_sha512_BYTES_MIN: number; export const crypto_kdf_hkdf_sha512_KEYBYTES: number; export const crypto_kem_CIPHERTEXTBYTES: number; export const crypto_kem_PRIMITIVE: string; export const crypto_kem_PUBLICKEYBYTES: number; export const crypto_kem_SECRETKEYBYTES: number; export const crypto_kem_SEEDBYTES: number; export const crypto_kem_SHAREDSECRETBYTES: number; export const crypto_kem_mlkem768_CIPHERTEXTBYTES: number; export const crypto_kem_mlkem768_PUBLICKEYBYTES: number; export const crypto_kem_mlkem768_SECRETKEYBYTES: number; export const crypto_kem_mlkem768_SEEDBYTES: number; export const crypto_kem_mlkem768_SHAREDSECRETBYTES: number; export const crypto_kem_xwing_CIPHERTEXTBYTES: number; export const crypto_kem_xwing_PUBLICKEYBYTES: number; export const crypto_kem_xwing_SECRETKEYBYTES: number; export const crypto_kem_xwing_SEEDBYTES: number; export const crypto_kem_xwing_SHAREDSECRETBYTES: number; export const crypto_kx_PUBLICKEYBYTES: number; export const crypto_kx_SECRETKEYBYTES: number; export const crypto_kx_SEEDBYTES: number; export const crypto_kx_SESSIONKEYBYTES: number; export const crypto_onetimeauth_BYTES: number; export const crypto_onetimeauth_KEYBYTES: number; export const crypto_onetimeauth_poly1305_BYTES: number; export const crypto_onetimeauth_poly1305_KEYBYTES: number; 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_STRBYTES: number; export const crypto_pwhash_STRPREFIX: string; export const crypto_pwhash_argon2i_BYTES_MAX: number; export const crypto_pwhash_argon2i_BYTES_MIN: number; export const crypto_pwhash_argon2i_MEMLIMIT_INTERACTIVE: number; export const crypto_pwhash_argon2i_MEMLIMIT_MAX: number; export const crypto_pwhash_argon2i_MEMLIMIT_MIN: number; export const crypto_pwhash_argon2i_MEMLIMIT_MODERATE: number; export const crypto_pwhash_argon2i_MEMLIMIT_SENSITIVE: number; export const crypto_pwhash_argon2i_OPSLIMIT_INTERACTIVE: number; export const crypto_pwhash_argon2i_OPSLIMIT_MAX: number; export const crypto_pwhash_argon2i_OPSLIMIT_MIN: number; export const crypto_pwhash_argon2i_OPSLIMIT_MODERATE: number; export const crypto_pwhash_argon2i_OPSLIMIT_SENSITIVE: number; export const crypto_pwhash_argon2i_PASSWD_MAX: number; export const crypto_pwhash_argon2i_PASSWD_MIN: number; export const crypto_pwhash_argon2i_SALTBYTES: number; export const crypto_pwhash_argon2i_STRBYTES: number; export const crypto_pwhash_argon2i_STRPREFIX: string; export const crypto_pwhash_argon2id_BYTES_MAX: number; export const crypto_pwhash_argon2id_BYTES_MIN: number; export const crypto_pwhash_argon2id_MEMLIMIT_INTERACTIVE: number; export const crypto_pwhash_argon2id_MEMLIMIT_MAX: number; export const crypto_pwhash_argon2id_MEMLIMIT_MIN: number; export const crypto_pwhash_argon2id_MEMLIMIT_MODERATE: number; export const crypto_pwhash_argon2id_MEMLIMIT_SENSITIVE: number; export const crypto_pwhash_argon2id_OPSLIMIT_INTERACTIVE: number; export const crypto_pwhash_argon2id_OPSLIMIT_MAX: number; export const crypto_pwhash_argon2id_OPSLIMIT_MIN: number; export const crypto_pwhash_argon2id_OPSLIMIT_MODERATE: number; export const crypto_pwhash_argon2id_OPSLIMIT_SENSITIVE: number; export const crypto_pwhash_argon2id_PASSWD_MAX: number; export const crypto_pwhash_argon2id_PASSWD_MIN: number; export const crypto_pwhash_argon2id_SALTBYTES: number; export const crypto_pwhash_argon2id_STRBYTES: number; export const crypto_pwhash_argon2id_STRPREFIX: string; export const crypto_pwhash_scryptsalsa208sha256_BYTES_MAX: number; export const crypto_pwhash_scryptsalsa208sha256_BYTES_MIN: number; export const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_INTERACTIVE: number; export const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MAX: number; export const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_MIN: number; export const crypto_pwhash_scryptsalsa208sha256_MEMLIMIT_SENSITIVE: number; export const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_INTERACTIVE: number; export const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MAX: number; export const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_MIN: number; export const crypto_pwhash_scryptsalsa208sha256_OPSLIMIT_SENSITIVE: number; export const crypto_pwhash_scryptsalsa208sha256_PASSWD_MAX: number; export const crypto_pwhash_scryptsalsa208sha256_PASSWD_MIN: number; export const crypto_pwhash_scryptsalsa208sha256_SALTBYTES: number; export const crypto_pwhash_scryptsalsa208sha256_STRBYTES: number; export const crypto_pwhash_scryptsalsa208sha256_STRPREFIX: string; export const crypto_scalarmult_BYTES: number; export const crypto_scalarmult_SCALARBYTES: number; export const crypto_scalarmult_curve25519_BYTES: number; export const crypto_scalarmult_curve25519_SCALARBYTES: number; export const crypto_scalarmult_ed25519_BYTES: number; export const crypto_scalarmult_ed25519_SCALARBYTES: number; export const crypto_scalarmult_ristretto255_BYTES: number; export const crypto_scalarmult_ristretto255_SCALARBYTES: number; export const crypto_secretbox_KEYBYTES: number; export const crypto_secretbox_MACBYTES: number; export const crypto_secretbox_MESSAGEBYTES_MAX: number; export const crypto_secretbox_NONCEBYTES: number; export const crypto_secretbox_xchacha20poly1305_KEYBYTES: number; export const crypto_secretbox_xchacha20poly1305_MACBYTES: number; export const crypto_secretbox_xchacha20poly1305_MESSAGEBYTES_MAX: number; export const crypto_secretbox_xchacha20poly1305_NONCEBYTES: number; export const crypto_secretbox_xsalsa20poly1305_KEYBYTES: number; export const crypto_secretbox_xsalsa20poly1305_MACBYTES: number; export const crypto_secretbox_xsalsa20poly1305_MESSAGEBYTES_MAX: number; export const crypto_secretbox_xsalsa20poly1305_NONCEBYTES: number; export const crypto_secretstream_xchacha20poly1305_ABYTES: number; export const crypto_secretstream_xchacha20poly1305_HEADERBYTES: number; export const crypto_secretstream_xchacha20poly1305_KEYBYTES: number; export const crypto_secretstream_xchacha20poly1305_MESSAGEBYTES_MAX: number; export const crypto_secretstream_xchacha20poly1305_TAG_FINAL: number; export const crypto_secretstream_xchacha20poly1305_TAG_MESSAGE: number; export const crypto_secretstream_xchacha20poly1305_TAG_PUSH: number; export const crypto_secretstream_xchacha20poly1305_TAG_REKEY: number; export const crypto_shorthash_BYTES: number; export const crypto_shorthash_KEYBYTES: number; export const crypto_shorthash_siphash24_BYTES: number; export const crypto_shorthash_siphash24_KEYBYTES: number; export const crypto_shorthash_siphashx24_BYTES: number; export const crypto_shorthash_siphashx24_KEYBYTES: number; export const crypto_sign_BYTES: number; export const crypto_sign_MESSAGEBYTES_MAX: number; export const crypto_sign_PUBLICKEYBYTES: number; export const crypto_sign_SECRETKEYBYTES: number; export const crypto_sign_SEEDBYTES: number; export const crypto_sign_ed25519_BYTES: number; export const crypto_sign_ed25519_MESSAGEBYTES_MAX: number; export const crypto_sign_ed25519_PUBLICKEYBYTES: number; export const crypto_sign_ed25519_SECRETKEYBYTES: number; export const crypto_sign_ed25519_SEEDBYTES: number; export const crypto_stream_KEYBYTES: number; export const crypto_stream_MESSAGEBYTES_MAX: number; export const crypto_stream_NONCEBYTES: number; export const crypto_stream_chacha20_IETF_KEYBYTES: number; export const crypto_stream_chacha20_IETF_MESSAGEBYTES_MAX: number; export const crypto_stream_chacha20_IETF_NONCEBYTES: number; export const crypto_stream_chacha20_KEYBYTES: number; export const crypto_stream_chacha20_MESSAGEBYTES_MAX: number; export const crypto_stream_chacha20_NONCEBYTES: number; export const crypto_stream_chacha20_ietf_KEYBYTES: number; export const crypto_stream_chacha20_ietf_MESSAGEBYTES_MAX: number; export const crypto_stream_chacha20_ietf_NONCEBYTES: number; export const crypto_stream_salsa2012_KEYBYTES: number; export const crypto_stream_salsa2012_MESSAGEBYTES_MAX: number; export const crypto_stream_salsa2012_NONCEBYTES: number; export const crypto_stream_salsa208_KEYBYTES: number; export const crypto_stream_salsa208_MESSAGEBYTES_MAX: number; export const crypto_stream_salsa208_NONCEBYTES: number; export const crypto_stream_salsa20_KEYBYTES: number; export const crypto_stream_salsa20_MESSAGEBYTES_MAX: number; export const crypto_stream_salsa20_NONCEBYTES: number; export const crypto_stream_xchacha20_KEYBYTES: number; export const crypto_stream_xchacha20_MESSAGEBYTES_MAX: number; export const crypto_stream_xchacha20_NONCEBYTES: number; export const crypto_stream_xsalsa20_KEYBYTES: number; export const crypto_stream_xsalsa20_MESSAGEBYTES_MAX: number; export const crypto_stream_xsalsa20_NONCEBYTES: number; export const crypto_xof_shake128_BLOCKBYTES: number; export const crypto_xof_shake128_STATEBYTES: number; export const crypto_xof_shake256_BLOCKBYTES: number; export const crypto_xof_shake256_STATEBYTES: number; export const crypto_xof_turboshake128_BLOCKBYTES: number; export const crypto_xof_turboshake128_STATEBYTES: number; export const crypto_xof_turboshake256_BLOCKBYTES: number; export const crypto_xof_turboshake256_STATEBYTES: number; export const crypto_verify_16_BYTES: number; export const crypto_verify_32_BYTES: number; export const crypto_verify_64_BYTES: number; // Crypto functions /** * @param secret_nonce (CRYPTO_AEAD_AEGIS128L_NSECBYTES bytes) * @param ciphertext * @param additional_data * @param public_nonce (CRYPTO_AEAD_AEGIS128L_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_AEGIS128L_ABYTES bytes) */ export function crypto_aead_aegis128l_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis128l_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_AEGIS128L_NSECBYTES bytes) * @param ciphertext * @param mac (CRYPTO_AEAD_AEGIS128L_ABYTES bytes) * @param additional_data * @param public_nonce (CRYPTO_AEAD_AEGIS128L_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string */ export function crypto_aead_aegis128l_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis128l_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_AEGIS128L_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_AEGIS128L_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_AEGIS128L_ABYTES bytes) */ export function crypto_aead_aegis128l_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis128l_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_AEGIS128L_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_AEGIS128L_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_aead_aegis128l_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_aead_aegis128l_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_AEGIS128L_KEYBYTES bytes) */ export function crypto_aead_aegis128l_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis128l_keygen(outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_AEGIS256_NSECBYTES bytes) * @param ciphertext * @param additional_data * @param public_nonce (CRYPTO_AEAD_AEGIS256_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS256_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_AEGIS256_ABYTES bytes) */ export function crypto_aead_aegis256_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis256_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_AEGIS256_NSECBYTES bytes) * @param ciphertext * @param mac (CRYPTO_AEAD_AEGIS256_ABYTES bytes) * @param additional_data * @param public_nonce (CRYPTO_AEAD_AEGIS256_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS256_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string */ export function crypto_aead_aegis256_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis256_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_AEGIS256_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_AEGIS256_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS256_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_AEGIS256_ABYTES bytes) */ export function crypto_aead_aegis256_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis256_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_AEGIS256_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_AEGIS256_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_AEGIS256_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_aead_aegis256_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_aead_aegis256_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_AEGIS256_KEYBYTES bytes) */ export function crypto_aead_aegis256_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_aegis256_keygen(outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES bytes) * @param ciphertext * @param additional_data * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_CHACHA20POLY1305_ABYTES bytes) */ export function crypto_aead_chacha20poly1305_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES bytes) * @param ciphertext * @param mac (CRYPTO_BOX_MACBYTES bytes) * @param additional_data * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string */ export function crypto_aead_chacha20poly1305_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_CHACHA20POLY1305_ABYTES bytes) */ export function crypto_aead_chacha20poly1305_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_aead_chacha20poly1305_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_aead_chacha20poly1305_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES bytes) * @param ciphertext * @param additional_data * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES bytes) */ export function crypto_aead_chacha20poly1305_ietf_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_ietf_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES bytes) * @param ciphertext * @param mac (CRYPTO_BOX_MACBYTES bytes) * @param additional_data * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string */ export function crypto_aead_chacha20poly1305_ietf_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_ietf_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES bytes) */ export function crypto_aead_chacha20poly1305_ietf_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_ietf_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_aead_chacha20poly1305_ietf_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_aead_chacha20poly1305_ietf_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES bytes) */ export function crypto_aead_chacha20poly1305_ietf_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_ietf_keygen(outputFormat: StringOutputFormat): string; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES bytes) */ export function crypto_aead_chacha20poly1305_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_chacha20poly1305_keygen(outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES bytes) * @param ciphertext * @param additional_data * @param public_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES bytes) */ export function crypto_aead_xchacha20poly1305_ietf_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_xchacha20poly1305_ietf_decrypt(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param secret_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES bytes) * @param ciphertext * @param mac (CRYPTO_BOX_MACBYTES bytes) * @param additional_data * @param public_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string */ export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_xchacha20poly1305_ietf_decrypt_detached(secret_nonce: Uint8Array | string | null, ciphertext: Uint8Array | string, mac: Uint8Array, additional_data: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES bytes) */ export function crypto_aead_xchacha20poly1305_ietf_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_xchacha20poly1305_ietf_encrypt(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param additional_data * @param secret_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES bytes) * @param public_nonce (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES bytes) * @param key (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_aead_xchacha20poly1305_ietf_encrypt_detached(message: Uint8Array | string, additional_data: Uint8Array | string | null, secret_nonce: Uint8Array | string | null, public_nonce: Uint8Array, key: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES bytes) */ export function crypto_aead_xchacha20poly1305_ietf_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_aead_xchacha20poly1305_ietf_keygen(outputFormat: StringOutputFormat): string; /** * @param message * @param key (CRYPTO_AUTH_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_BYTES bytes) */ export function crypto_auth(message: Uint8Array | string, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth(message: Uint8Array | string, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param key (CRYPTO_AUTH_HMACSHA256_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA256_BYTES bytes) */ export function crypto_auth_hmacsha256(message: Uint8Array | string, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha256(message: Uint8Array | string, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param state_address * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA256_BYTES bytes) */ export function crypto_auth_hmacsha256_final(state_address: StateAddress, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha256_final(state_address: StateAddress, outputFormat: StringOutputFormat): string; /** * @param key * @returns StateAddress */ export function crypto_auth_hmacsha256_init(key: Uint8Array | string | null): StateAddress; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA256_KEYBYTES bytes) */ export function crypto_auth_hmacsha256_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha256_keygen(outputFormat: StringOutputFormat): string; /** * @param state_address * @param message_chunk */ export function crypto_auth_hmacsha256_update(state_address: StateAddress, message_chunk: Uint8Array | string): void; /** * @param tag (CRYPTO_AUTH_HMACSHA256_BYTES bytes) * @param message * @param key (CRYPTO_AUTH_HMACSHA256_KEYBYTES bytes) * @returns boolean */ export function crypto_auth_hmacsha256_verify(tag: Uint8Array, message: Uint8Array | string, key: Uint8Array): boolean; /** * @param message * @param key (CRYPTO_AUTH_HMACSHA512_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA512_BYTES bytes) */ export function crypto_auth_hmacsha512(message: Uint8Array | string, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha512(message: Uint8Array | string, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param key (CRYPTO_AUTH_HMACSHA512256_KEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA512256_BYTES bytes) */ export function crypto_auth_hmacsha512256(message: Uint8Array | string, key: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha512256(message: Uint8Array | string, key: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param state_address * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA512256_BYTES bytes) */ export function crypto_auth_hmacsha512256_final(state_address: StateAddress, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha512256_final(state_address: StateAddress, outputFormat: StringOutputFormat): string; /** * @param key * @returns StateAddress */ export function crypto_auth_hmacsha512256_init(key: Uint8Array | string | null): StateAddress; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA512256_KEYBYTES bytes) */ export function crypto_auth_hmacsha512256_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha512256_keygen(outputFormat: StringOutputFormat): string; /** * @param state_address * @param message_chunk */ export function crypto_auth_hmacsha512256_update(state_address: StateAddress, message_chunk: Uint8Array | string): void; /** * @param tag (CRYPTO_AUTH_HMACSHA512256_BYTES bytes) * @param message * @param key (CRYPTO_AUTH_HMACSHA512256_KEYBYTES bytes) * @returns boolean */ export function crypto_auth_hmacsha512256_verify(tag: Uint8Array, message: Uint8Array | string, key: Uint8Array): boolean; /** * @param state_address * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA512_BYTES bytes) */ export function crypto_auth_hmacsha512_final(state_address: StateAddress, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha512_final(state_address: StateAddress, outputFormat: StringOutputFormat): string; /** * @param key * @returns StateAddress */ export function crypto_auth_hmacsha512_init(key: Uint8Array | string | null): StateAddress; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_HMACSHA512_KEYBYTES bytes) */ export function crypto_auth_hmacsha512_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_hmacsha512_keygen(outputFormat: StringOutputFormat): string; /** * @param state_address * @param message_chunk */ export function crypto_auth_hmacsha512_update(state_address: StateAddress, message_chunk: Uint8Array | string): void; /** * @param tag (CRYPTO_AUTH_HMACSHA512_BYTES bytes) * @param message * @param key (CRYPTO_AUTH_HMACSHA512_KEYBYTES bytes) * @returns boolean */ export function crypto_auth_hmacsha512_verify(tag: Uint8Array, message: Uint8Array | string, key: Uint8Array): boolean; /** * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_AUTH_KEYBYTES bytes) */ export function crypto_auth_keygen(outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_auth_keygen(outputFormat: StringOutputFormat): string; /** * @param tag (CRYPTO_AUTH_BYTES bytes) * @param message * @param key (CRYPTO_AUTH_KEYBYTES bytes) * @returns boolean */ export function crypto_auth_verify(tag: Uint8Array, message: Uint8Array | string, key: Uint8Array): boolean; /** * @param publicKey (CRYPTO_BOX_PUBLICKEYBYTES bytes) * @param privateKey (CRYPTO_BOX_SECRETKEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_BOX_BEFORENMBYTES bytes) */ 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; /** * @param publicKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_PUBLICKEYBYTES bytes) * @param privateKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_SECRETKEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_BEFORENMBYTES bytes) */ export function crypto_box_curve25519xchacha20poly1305_beforenm(publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): Uint8Array; export function crypto_box_curve25519xchacha20poly1305_beforenm(publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): string; /** * @param message * @param nonce (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_NONCEBYTES bytes) * @param publicKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_PUBLICKEYBYTES bytes) * @param privateKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_SECRETKEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_box_curve25519xchacha20poly1305_detached(message: Uint8Array | string, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_box_curve25519xchacha20poly1305_detached(message: Uint8Array | string, nonce: Uint8Array, publicKey: Uint8Array, privateKey: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param message * @param nonce (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_NONCEBYTES bytes) * @param sharedKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_BEFORENMBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns {ciphertext, mac} */ export function crypto_box_curve25519xchacha20poly1305_detached_afternm(message: Uint8Array | string, nonce: Uint8Array, sharedKey: Uint8Array, outputFormat?: Uint8ArrayOutputFormat | null): { ciphertext: Uint8Array; mac: Uint8Array }; export function crypto_box_curve25519xchacha20poly1305_detached_afternm(message: Uint8Array | string, nonce: Uint8Array, sharedKey: Uint8Array, outputFormat: StringOutputFormat): { ciphertext: string; mac: string }; /** * @param message * @param nonce (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_NONCEBYTES bytes) * @param publicKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_PUBLICKEYBYTES bytes) * @param privateKey (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_SECRETKEYBYTES bytes) * @param outputFormat Output format (default: Uint8Array) * @returns Uint8Array | string (CRYPTO_BOX_CURVE25519XCHACHA20POLY1305_MACBYTES bytes) */ export function crypto_box_curve25519xchacha20poly1305_easy(message: