pin

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptPinBlock

func DecryptPinBlock(pinBlock []byte, key []byte) (result []byte, err error)

func EncryptPinBlock

func EncryptPinBlock(pinBlock []byte, key []byte) (result []byte, err error)

Types

type PinBlock_Iso0

type PinBlock_Iso0 struct {
	PinBlocker
}

func (*PinBlock_Iso0) Encrypt

func (pin_block *PinBlock_Iso0) Encrypt(pan_12digits string, clear_pin string, key []byte) ([]byte, error)

func (*PinBlock_Iso0) GetPin

func (pin_block *PinBlock_Iso0) GetPin(pan_12digits string, pin_block_data []byte, key []byte) (res string, err error)

type PinBlocker

type PinBlocker interface {
	Encrypt(pan string, clearPin string, key []byte) ([]byte, error)
	GetPin(pan string, pinBlockData []byte, key []byte) (string, error)
}

type PinblockIbm3264

type PinblockIbm3264 struct {
	PinBlocker
}

func (*PinblockIbm3264) Encrypt

func (pinBlock *PinblockIbm3264) Encrypt(pan string, clearPin string, key []byte) ([]byte, error)

func (*PinblockIbm3264) GetPin

func (pinBlock *PinblockIbm3264) GetPin(pan string, pinBlockData []byte, key []byte) (res string, err error)

type PinblockIso1

type PinblockIso1 struct {
	PinBlocker
}

func (*PinblockIso1) Encrypt

func (pinBlock *PinblockIso1) Encrypt(pan string, clearPin string, key []byte) (res []byte, err error)

func (*PinblockIso1) GetPin

func (pinBlock *PinblockIso1) GetPin(pan string, pinBlockData []byte, key []byte) (res string, err error)

type PinblockIso3

type PinblockIso3 struct {
	PinBlocker
}

func (*PinblockIso3) Encrypt

func (pinBlock *PinblockIso3) Encrypt(pan12digits string, clearPin string, key []byte) (res []byte, err error)

func (*PinblockIso3) GetPin

func (pinBlock *PinblockIso3) GetPin(pan12digits string, pinBlockData []byte, key []byte) (res string, err error)

Jump to

Keyboard shortcuts

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