Interface SecureChannel

  • All Known Implementing Classes:
    GPSCP02SecureChannel, IsoSecureChannel

    public interface SecureChannel
    Interface implementing an APDU wrapping / unwrapping mechanism
    Author:
    Andreas Schwier (info@cardcontact.de)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALL
      Combination of CPRO, CENC, RPRO, RENC
      static int CENC
      Usage qualifier: Command APDU is encrypted
      static int CPRO
      Usage qualifier: Command APDU is MAC protected
      static int RENC
      Usage qualifier: Response APDU is encrypted
      static int RPRO
      Usage qualifier: Response APDU is MAC protected
    • Method Detail

      • wrap

        CommandAPDU wrap​(CommandAPDU apduToWrap,
                         int usageQualifier)
        Wrap a CommandAPDU
        Parameters:
        apduToWrap - Command APDU to be wrapped
        usageQualifier - Qualifier to control the transformation process
        Returns:
        Wrapped APDU
      • unwrap

        ResponseAPDU unwrap​(ResponseAPDU apduToUnwrap,
                            int usageQualifier)
        Unwrap a CommandAPDU
        Parameters:
        apduToUnwrap - Response APDU to be unwrapped
        usageQualifier - Qualifier to control the transformation process
        Returns:
        Wrapped APDU