Search in sources :

Example 1 with AESFastEngine

use of org.openecard.bouncycastle.crypto.engines.AESFastEngine in project open-ecard by ecsec.

the class SecureMessaging method getCMAC.

/**
 * Gets the CMAC.
 *
 * @param smssc Secure Messaging Send Sequence Counter
 * @return CMAC
 */
private CMac getCMAC(byte[] smssc) {
    CMac cmac = new CMac(new AESFastEngine());
    cmac.init(new KeyParameter(keyMAC));
    cmac.update(smssc, 0, smssc.length);
    return cmac;
}
Also used : CMac(org.openecard.bouncycastle.crypto.macs.CMac) KeyParameter(org.openecard.bouncycastle.crypto.params.KeyParameter) AESFastEngine(org.openecard.bouncycastle.crypto.engines.AESFastEngine)

Aggregations

AESFastEngine (org.openecard.bouncycastle.crypto.engines.AESFastEngine)1 CMac (org.openecard.bouncycastle.crypto.macs.CMac)1 KeyParameter (org.openecard.bouncycastle.crypto.params.KeyParameter)1