Example usage for org.bouncycastle.crypto.engines AESLightEngine AESLightEngine

List of usage examples for org.bouncycastle.crypto.engines AESLightEngine AESLightEngine

Introduction

In this page you can find the example usage for org.bouncycastle.crypto.engines AESLightEngine AESLightEngine.

Prototype

public AESLightEngine() 

Source Link

Document

default constructor - 128 bit block size.

Usage

From source file:common.crypto.bouncycastle.CCryptoAESBC.java

License:Open Source License

@Override
public void initialize(byte[] byaIV, byte[] byaKey, CryptoTypes.EBlockMode eMode,
        CryptoTypes.EKeyLength eKeyLen) {
    switch (eMode) {
    case CBC://  ww w . j av a2 s  .  co m
        m_blockCipher = new CBCBlockCipher(new AESLightEngine());
        break;
    }
    m_keyParam = new ParametersWithIV(new KeyParameter(byaKey), byaIV);
    m_nBlockSize = m_blockCipher.getBlockSize();
}

From source file:common.crypto.bouncycastle.CCryptoCMacBC.java

License:Open Source License

@Override
public void initialize(CryptoTypes.EKeyLength eLen) {
    m_nKeyLen = CryptoTypes.getKeyLen(eLen);
    BlockCipher bc = new AESLightEngine();
    m_cmac = new CMac(bc, m_nKeyLen);

}