diff --git a/src/aes.ts b/src/aes.ts index 1259887..c9d6d4c 100644 --- a/src/aes.ts +++ b/src/aes.ts @@ -692,7 +692,7 @@ const limit = (name: string, min: number, max: number) => (value: number) => { * plaintexts will produce identical ciphertexts. * RFC 8452, https://datatracker.ietf.org/doc/html/rfc8452 */ -export const siv: ((key: Uint8Array, nonce: Uint8Array, AAD?: Uint8Array) => Cipher) & { +export const gcmsiv: ((key: Uint8Array, nonce: Uint8Array, AAD?: Uint8Array) => Cipher) & { blockSize: number; nonceLength: number; tagLength: number; @@ -794,6 +794,13 @@ export const siv: ((key: Uint8Array, nonce: Uint8Array, AAD?: Uint8Array) => Cip } ); +/** + * AES-GCM-SIV, not AES-SIV. + * This is legace name, use `gcmsiv` export instead. + * @deprecated + */ +export const siv: typeof gcmsiv = gcmsiv; + function isBytes32(a: unknown): a is Uint32Array { return ( a instanceof Uint32Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint32Array')