Class Index | File Index

## Classes

- _global_
- AccessController
- APDU
- AuthenticationObject
- CAConnection
- ChipAuthentication
- ChipAuthenticationDomainParameterInfo
- ChipAuthenticationInfo
- ChipAuthenticationPublicKeyInfo
- CommandInterpreter
- CRLGenerator
- CVC
- CVCCA
- CVCertificateStore
- DataUnitAPDU
- DF
- DKEK
- DNEncoder
- EAC20
- EAC2CVCertificateGenerator
- EAC2CVRequestGenerator
- FCP
- File
- FileEncryptor
- FileSelector
- FileSystemIdObject
- FSNode
- GPSCP03
- HSMCVCertificateStore
- HSMKeyStore
- LinearEF
- ManagePKA
- P11CVCertificateStore
- PACE
- PACEDomainParameterInfo
- PACEInfo
- PaperKeyEncoding
- PKCS10Generator
- PublicKeyFile
- PublicKeyReference
- RAMClient
- RestrictedIdentificationDomainParameterInfo
- RestrictedIdentificationInfo
- SecureChannelHandler
- SecureMessagingCommandAPDUDecoder
- SecurityEnvironment
- SignatureKey
- SmartCardHSM
- SmartCardHSMCrypto
- SmartCardHSMInitializer
- SmartCardHSMKey
- SmartCardHSMKeySpecGenerator
- SmartCardHSMSymmetricKeySpecGenerator
- TransparentEF
- TrustAnchor
- X509CertificateGenerator
- X509CertificateIssuer
- X509CertificateStore
- X509Signer

# Class SecureMessagingCommandAPDUDecoder

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

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| SecureMessagingCommandAPDUDecoder(channel, apdu) Creates a decoder for a single secure messaging command APDU

Method Summary
Method Attributes | Method Name and Description
--- | ---
| buildMACInput() Build the MAC input block
| decryptBody(key) Decrypt the body of a secure messaging APDU
| getLe() 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
| verifyMAC() 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 Mar 27 2026 16:43:33 GMT+0100 (CET)