An array of 32-bit words.

interface WordArray {
    sigBytes: number;
    words: number[];
    clamp(): void;
    clone(): cryptojs.lib.WordArray;
    concat(wordArray: cryptojs.lib.WordArray): this;
    toString(encoder?: Encoder): string;
}

Properties

sigBytes: number

The number of significant bytes in this word array.

words: number[]

The array of 32-bit words.

Methods

  • Removes insignificant bits.

    Returns void

    wordArray.clamp();
    
  • Creates a copy of this word array.

    Returns cryptojs.lib.WordArray

    The clone.

    var clone = wordArray.clone();
    
  • Concatenates a word array to this word array.

    Parameters

    Returns this

    This word array.

    wordArray1.concat(wordArray2);
    
  • Converts this word array to a string.

    Parameters

    • Optionalencoder: Encoder

      (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex

    Returns string

    The stringified word array.

    var string = wordArray + '';
    var string = wordArray.toString();
    var string = wordArray.toString(CryptoJS.enc.Utf8);