UNPKG

@li0ard/magma

Version:

Magma cipher implementation in pure TypeScript

22 lines (21 loc) 843 B
import { type Sbox } from "../"; /** * Encrypts data using the Output Feedback (OFB) mode with Magma cipher. * * @param key Encryption key * @param data Data to be encrypted * @param iv Initialization vector * @param sbox Optional substitution box, defaults to `ID_TC26_GOST_28147_PARAM_Z` * @returns {Uint8Array} */ export declare const encryptOFB: (key: Uint8Array, data: Uint8Array, iv: Uint8Array, sbox?: Sbox) => Uint8Array; /** * Decrypts data using the Output Feedback (OFB) mode with Magma cipher. * * @param key Encryption key * @param data Data to be decrypted * @param iv Initialization vector * @param sbox Optional substitution box, defaults to `ID_TC26_GOST_28147_PARAM_Z` * @returns {Uint8Array} */ export declare const decryptOFB: (key: Uint8Array, data: Uint8Array, iv: Uint8Array, sbox?: Sbox) => Uint8Array;