Class: EMV::APDU::CPS::C_MAC_APDU

Inherits:
CPS_APDU show all
Defined in:
lib/emv/cps_apdu.rb

Direct Known Subclasses

EXTERNAL_AUTHENTICATE, STORE_DATA

Instance Attribute Summary collapse

Attributes inherited from CPS_APDU

#secure_context

Instance Method Summary collapse

Constructor Details

#initialize(card, secure_context) ⇒ C_MAC_APDU

Returns a new instance of C_MAC_APDU.



177
178
179
# File 'lib/emv/cps_apdu.rb', line 177

def initialize card, secure_context
  super
end

Instance Attribute Details

#c_macObject

calculate the c-mac according to 5.4.2.2



182
183
184
185
# File 'lib/emv/cps_apdu.rb', line 182

def c_mac
  @c_mac ||=  secure_context.calculate_c_mac(self) 
  @c_mac  
end