.. java:import:: java.security GeneralSecurityException .. java:import:: java.util ArrayList MutualAuthenticateHandler ========================= .. java:package:: com.idopte.scmapi :noindex: .. java:type:: public interface MutualAuthenticateHandler Methods ------- computeMutualAuthenticate1 ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: byte[] computeMutualAuthenticate1(byte[] iccSerial, byte[] iccChallenge) throws SCMException, GeneralSecurityException :outertype: MutualAuthenticateHandler Performs the first half of the authentication process. :param iccSerial: the serial number of the card. 10 bytes are given for ``iccSerial`` but only the 8 last bytes should be used. :param iccChallenge: the 8-bytes random word given by the card :throws SCMException: :throws GeneralSecurityException: :return: the buffer containing the complete data field (encrypted challenges and key seeds followed by the MAC) to be provided to the MUTUAL AUTHENTICATE command. computeMutualAuthenticate2 ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: ArrayList computeMutualAuthenticate2(byte[] response) throws SCMException :outertype: MutualAuthenticateHandler Check the cryptograms generated by the card and finalize the authentication by computing the session keys. Computes session encrypt key, session mac key, and sequence that will be used to open a secure channel. :param response: the response of previous mutual authenticate command. :throws SCMException: :return: the session encrypt key, the session mac key and sequence in a List.