iso9797

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeRawMAC1

func ComputeRawMAC1(key, data []byte) ([]byte, error)

func ComputeRawMAC3

func ComputeRawMAC3(key1, key2, data []byte) ([]byte, error)

func Pad00

func Pad00(data []byte, blockSize int) []byte

Pad00 is an alias to PadBytesMethod1

func Pad80

func Pad80(data []byte, blockSize int) []byte

Pad80 is an alias to PadBytesMethod2

func PadBytesMethod1

func PadBytesMethod1(data []byte, blockSize int) []byte

PadBytesMethod1 adds bits with value 0 to the end of the data until the padded data is a multiple of n. If the original data was already a multiple of n, no bits are added.

func PadBytesMethod2

func PadBytesMethod2(data []byte, blockSize int) []byte

PadBytesMethod2 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

func UnpadBytesMethod2

func UnpadBytesMethod2(data []byte) ([]byte, error)

Types

type InitialTransformation

type InitialTransformation func(block []byte) []byte

type OutputTransformation

type OutputTransformation func(block []byte) []byte

type Padding

type Padding func(block []byte, blockSize int) []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL