Skip to content

Commit

Permalink
Rename siv to gcmsiv
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 31, 2025
1 parent 413bdf6 commit 05a6534
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/aes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 05a6534

Please sign in to comment.