Skip to content

Instantly share code, notes, and snippets.

@ci7lus
Created December 7, 2021 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ci7lus/81340a07b7acd7fea2a12ae85d107d5d to your computer and use it in GitHub Desktop.
Save ci7lus/81340a07b7acd7fea2a12ae85d107d5d to your computer and use it in GitHub Desktop.
declare module "sodium-javascript" {
export function crypto_aead_chacha20poly1305_ietf_encrypt(
ciphertext: Uint8Array,
message: Uint8Array,
ad: Uint8Array | null,
nsec: unknown | null,
npub_nonce: Uint8Array,
key: Uint8Array
): number
export function crypto_aead_chacha20poly1305_ietf_encrypt_detached(
ciphertext: Uint8Array,
mac: Uint8Array,
message: Uint8Array,
ad: Uint8Array | null,
nsec: unknown | null,
npub_nonce: Uint8Array,
key: Uint8Array
): number
export const crypto_aead_chacha20poly1305_ietf_ABYTES: number
export const crypto_aead_chacha20poly1305_ietf_NPUBBYTES: number
export const crypto_aead_chacha20poly1305_ietf_KEYBYTES: number
export const crypto_aead_chacha20poly1305_ietf_MESSAGEBYTES_MAX: number
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment