A collection of cipher parameters.

interface CipherParams {
    algorithm: CipherStatic;
    blockSize: number;
    ciphertext: cryptojs.lib.WordArray;
    formatter: Format;
    iv: cryptojs.lib.WordArray;
    key: cryptojs.lib.WordArray;
    mode: Mode;
    padding: Padding;
    salt: cryptojs.lib.WordArray;
    toString(formatter?: Format): string;
}

Properties

algorithm: CipherStatic

The cipher algorithm.

blockSize: number

The block size of the cipher.

ciphertext: cryptojs.lib.WordArray

The raw ciphertext.

formatter: Format

The default formatting strategy to convert this cipher params object to a string.

The IV used in the ciphering operation.

The key to this ciphertext.

mode: Mode

The block mode used in the ciphering operation.

padding: Padding

The padding scheme used in the ciphering operation.

The salt used with a key derivation function.

Methods

  • Converts this cipher params object to a string.

    Parameters

    • Optionalformatter: Format

      (Optional) The formatting strategy to use.

    Returns string

    The stringified cipher params.

    Error If neither the formatter nor the default formatter is set.

    var string = cipherParams + '';
    var string = cipherParams.toString();
    var string = cipherParams.toString(CryptoJS.format.OpenSSL);