Files
lolympus-agent/dakao/dist/crypto/aes.d.ts
T
2026-02-02 19:14:07 -08:00

16 lines
649 B
TypeScript

/** GCM nonce size in bytes */
export declare const NONCE_SIZE = 12;
/** GCM authentication tag size in bytes */
export declare const TAG_SIZE = 16;
/**
* Encrypt with AES-128-GCM.
* Returns ciphertext + 16-byte auth tag appended.
*/
export declare function aesEncryptGCM(plaintext: Buffer, key: Buffer, nonce: Buffer): Buffer;
/**
* Decrypt AES-128-GCM. Input is ciphertext with 16-byte auth tag appended.
*/
export declare function aesDecryptGCM(ciphertextWithTag: Buffer, key: Buffer, nonce: Buffer): Buffer;
export declare function generateAESKey(): Buffer;
export declare function generateNonce(): Buffer;
//# sourceMappingURL=aes.d.ts.map