node-aead-crypto
Version:
Node.js module which provides OpenSSL bindings for AEAD ciphers
18 lines (15 loc) • 695 B
TypeScript
/* tslint:disable */
/* eslint-disable */
/* auto-generated by NAPI-RS */
export interface EncryptionResult {
ciphertext: Buffer
auth_tag: Buffer
}
export interface DecryptionResult {
plaintext: Buffer
auth_ok: boolean
}
export function gcmEncrypt(key: Buffer, iv: Buffer, plaintext: Buffer, aad: Buffer): EncryptionResult
export function gcmDecrypt(key: Buffer, iv: Buffer, ciphertext: Buffer, aad: Buffer, authTag: Buffer): DecryptionResult
export function ccmEncrypt(key: Buffer, iv: Buffer, plaintext: Buffer, aad: Buffer, authTagLen: number): EncryptionResult
export function ccmDecrypt(key: Buffer, iv: Buffer, ciphertext: Buffer, aad: Buffer, authTag: Buffer): DecryptionResult