use of org.bouncycastle.crypto.engines.AESLightEngine in project openremote by openremote.
the class SecureUtils method encryptWithAES.
public static byte[] encryptWithAES(final byte[] data, final byte[] key) {
final byte[] encrypted = new byte[data.length];
final CipherParameters cipherParameters = new KeyParameter(key);
final AESLightEngine engine = new AESLightEngine();
engine.init(true, cipherParameters);
engine.processBlock(data, 0, encrypted, 0);
return encrypted;
}
Aggregations