tools

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crc16

func Crc16(data []byte) []byte

Crc16 calculate CRC16

func EncryptFullProtection

func EncryptFullProtection(cmdCtr int, data, ke []byte) ([]byte, error)

EncryptFullProtection function to Encrypted data in full protection mode

func MacFullProtection

func MacFullProtection(cmd smartcard.ISO7816cmd, cmdCtr int, data, key []byte) ([]byte, error)

MacFullProtection function to calculated the CMAC in full protection mode

func OfflineChangeKeyEncrypt

func OfflineChangeKeyEncrypt(data, kc, samUID []byte, changeCtr int) ([]byte, error)

OfflineChangeKeyEncrypt function to Encrypt data in full OfflineChangeKey

func OfflineChangeKeyMac

func OfflineChangeKeyMac(data, kc []byte, changeCtr int) ([]byte, error)

OfflineChangeKeyMac function to have Macing data in full OfflineChangeKey

Types

This section is empty.

Jump to

Keyboard shortcuts

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