UNPKG

@li0ard/magma

Version:

Magma cipher implementation in pure TypeScript

17 lines (16 loc) 659 B
import { type Sbox } from "../"; /** * Compute MAC with Magma cipher (GOST 28147-89) * @param key Encryption key * @param data Input data * @param iv Initialization vector * @param sbox Optional substitution box, defaults to `ID_GOST_28147_89_CRYPTO_PRO_A_PARAM_SET` */ export declare const mac_legacy: (key: Uint8Array, data: Uint8Array, iv?: Uint8Array, sbox?: Sbox) => Uint8Array; /** * Compute MAC with Magma cipher * @param key Encryption key * @param data Input data * @param sbox Optional substitution box, defaults to `ID_TC26_GOST_28147_PARAM_Z` */ export declare const mac: (key: Uint8Array, data: Uint8Array, sbox?: Sbox) => Uint8Array;