@li0ard/gost - v0.2.7
    Preparing search index...

    Class Magma

    Magma (GOST R 34.12-2015 and GOST 28147-89) cipher

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Magma (GOST R 34.12-2015 and GOST 28147-89) cipher

      Parameters

      • key: TArg<Uint8Array<ArrayBufferLike>>

        encryption key

      • sbox: TArg<Uint8Array<ArrayBufferLike>> = TC26_GOST_28147_PARAM_Z

        S-Box

      • isLegacy: boolean = false

        whether to use GOST 28147-89 instead of GOST R 34.12-2015

      Returns Magma

    Properties

    blockSize: 8 = BLOCKSIZE

    Block size

    isLegacy: boolean = false

    whether to use GOST 28147-89 instead of GOST R 34.12-2015

    keySize: 32

    Key size

    Methods

    • Decrypt block

      Parameters

      • ciphertext: TArg<Uint8Array<ArrayBufferLike>>

      Returns Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>

    • Encrypt block

      Parameters

      • plaintext: TArg<Uint8Array<ArrayBufferLike>>

      Returns Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>