Class SecureMessagingWrapper

    • Constructor Detail

      • SecureMessagingWrapper

        public SecureMessagingWrapper​(int maxTranceiveLength,
                                      boolean shouldCheckMAC)
        Creates a secure messaging wrapper.
        Parameters:
        maxTranceiveLength - Returns the maximum tranceive length of wrapped command and response APDUs, typical values are 256 and 65536
        shouldCheckMAC - a boolean indicating whether this wrapper will check the MAC in wrapped response APDUs
    • Method Detail

      • getSendSequenceCounter

        public abstract long getSendSequenceCounter()
        Returns the send sequence counter.
        Returns:
        the send sequence counter
      • getEncryptionKey

        public abstract SecretKey getEncryptionKey()
        Returns the shared key for encrypting APDU payloads.
        Returns:
        the encryption key
      • getMACKey

        public abstract SecretKey getMACKey()
        Returns the shared key for computing message authentication codes over APDU payloads.
        Returns:
        the MAC key
      • shouldCheckMAC

        public boolean shouldCheckMAC()
        Returns a boolean indicating whether this wrapper will check the MAC in wrapped response APDUs.
        Returns:
        a boolean indicating whether this wrapper will check the MAC in wrapped response APDUs
      • getMaxTranceiveLength

        public int getMaxTranceiveLength()
        Returns the maximum tranceive length of wrapped command and response APDUs, typical values are 256 and 65536.
        Returns:
        the maximum tranceive length of wrapped command and response APDUs