Function padArrayBytesRight

  • Pads an array of bytes on the right with zeros to ensure it has a length of 4.

    Parameters

    • a: number[]

      The array of bytes to pad.

    Returns number[]

    Example

    padArrayBytesRight([1, 2, 3]);
    //=> [1, 2, 3, 0]
    padArrayBytesRight([1]);
    //=> [1, 0, 0, 0]

Generated using TypeDoc