Class Index | File Index

Classes


Class SecureMessagingCommandAPDUDecoder

Decoder for a secure messaging APDU
Defined in: SecureMessagingCommandAPDUDecoder.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a decoder for a single secure messaging command APDU
Method Summary
Method Attributes Method Name and Description
 
Build the MAC input block
 
Decrypt the body of a secure messaging APDU
 
Return value of optional Le element with tag '97'
<static>  
SecureMessagingCommandAPDUDecoder.pad(buffer, blocksize)
Applies ISO padding to the input buffer
<static>  
SecureMessagingCommandAPDUDecoder.removePadding(buffer)
Removes the ISO padding
 
Verify the message authentication code (MAC)
Class Detail
SecureMessagingCommandAPDUDecoder(channel, apdu)
Creates a decoder for a single secure messaging command APDU
Parameters:
{SecureChannel} channel
the secure channel object
{APDU} apdu
the secure messaging APDU
Method Detail
{ByteString} buildMACInput()
Build the MAC input block
Returns:
the MAC calculation input block

{ByteString} decryptBody(key)
Decrypt the body of a secure messaging APDU
Parameters:
{Key} key
the encryption key
Returns:
the plain body or undefined if no encrypted body

{Number} getLe()
Return value of optional Le element with tag '97'
Returns:
the value of the Le element

<static> {ByteBuffer} SecureMessagingCommandAPDUDecoder.pad(buffer, blocksize)
Applies ISO padding to the input buffer
Parameters:
{ByteBuffer} buffer
the input buffer
{Number} blocksize
the block size
Returns:
the buffer argument

<static> {ByteString} SecureMessagingCommandAPDUDecoder.removePadding(buffer)
Removes the ISO padding
Parameters:
{ByteString} buffer
the input with with padding
Returns:
the buffer without padding

{boolean} verifyMAC()
Verify the message authentication code (MAC)
Returns:
true if the MAC is valid

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 16 2024 18:38:12 GMT+0100 (CET)