Skip to content

setLengthLeft

setLengthLeft(msg, length): Uint8Array

Left Pads a Uint8Array with leading zeros till it has length bytes. Or it truncates the beginning if it exceeds.

Parameters

msg: Uint8Array

the value to pad

length: number

the number of bytes the output should be

Returns

Uint8Array

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/bytes.d.ts:58