Documentation ¶
Index ¶
Constants ¶
View Source
const ( AddressS_PAD0 byte = 0x00 AddressS_PAD1 byte = 0x01 AddressS_PAD2 byte = 0x02 AddressS_PAD3 byte = 0x03 AddressS_PAD4 byte = 0x04 AddressS_PAD5 byte = 0x05 AddressS_PAD6 byte = 0x06 AddressS_PAD7 byte = 0x07 AddressS_PAD8 byte = 0x08 AddressS_PAD9 byte = 0x09 AddressS_PAD10 byte = 0x0a AddressS_PAD11 byte = 0x0b AddressS_PAD12 byte = 0x0c AddressS_PAD13 byte = 0x0d AddressREG byte = 0x0e AddressRC byte = 0x80 AddressMAC byte = 0x81 AddressID byte = 0x82 AddressD_ID byte = 0x83 AddressSER_C byte = 0x84 AddressSYS_C byte = 0x85 AddressCKV byte = 0x86 AddressCK byte = 0x87 AddressMC byte = 0x88 AddressWCNT byte = 0x90 AddressMAC_A byte = 0x91 AddressSTATE byte = 0x92 AddressCRC_CHECK byte = 0xa0 )
View Source
const ( ServiceRW = 0x0009 ServiceRO = 0x000b )
Variables ¶
View Source
var ErrMacNotMatched = errors.New("mac_a didn't matched")
View Source
var ErrMasterKeyNil = errors.New("master key is nil")
View Source
var ErrNoResponse = errors.New("no response from card")
View Source
var ErrUnknown = errors.New("unknown error")
Functions ¶
This section is empty.
Types ¶
type FeliCaLiteS ¶
func (*FeliCaLiteS) GenCardKey ¶
func (c *FeliCaLiteS) GenCardKey(masterKey *[24]byte)
Generate CK with ID
func (*FeliCaLiteS) GenMac ¶
func (c *FeliCaLiteS) GenMac(data [][8]byte) [8]byte
Generate MAC with SK and RC
func (*FeliCaLiteS) GenReadMac ¶
func (c *FeliCaLiteS) GenReadMac(blocks []Block) [8]byte
Generate MAC from readed data with SK and RC
func (*FeliCaLiteS) GenSessionKey ¶
func (c *FeliCaLiteS) GenSessionKey()
Generate SK with CK and RC
func (*FeliCaLiteS) GenWriteMac ¶
func (c *FeliCaLiteS) GenWriteMac(wcnt [3]byte, block Block) [8]byte
Generate MAC for write data with SK and RC
Click to show internal directories.
Click to hide internal directories.