Documentation
¶
Index ¶
- func Pad00(data []byte, blockSize int) ([]byte, error)
- func Pad00Extra(data []byte, blockSize int) ([]byte, error)
- func Pad80(data []byte, blockSize int) ([]byte, error)
- func Pad80Extra(data []byte, blockSize int) ([]byte, error)
- func PadOrTruncateRight(data []byte, length int) []byte
- func PadOrTruncateRightWithByte(data []byte, length int, b byte) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Pad00 ¶
Pad00 pads the data with 0x00s until the data is an exact multiple of the block size. When the data size is already a multiple of the block size, nothing will be added. This is equivalent to ISO 9797-1 Padding Method 1.
func Pad00Extra ¶
Pad80Extra pads the data with 0x00s until the data is an exact multiple of the block size. When the data size is already a multiple of the block size, a new block will be added following the same rules.
func Pad80 ¶
Pad80 pads the data with byte 0x80 and then 0x00s until the data is an exact multiple of the block size. When the data size is already a multiple of the block size, nothing will be added. This is equivalent to ISO 9797-1 Padding Method 2.
func Pad80Extra ¶
Pad80Extra pads the data with byte 0x80 and then 0x00s until the data is an exact multiple of the block size. When the data size is already a multiple of the block size, a new block will be added following the same rules.
func PadOrTruncateRight ¶
Types ¶
This section is empty.