List of usage examples for org.bouncycastle.crypto.engines RFC3394WrapEngine wrap
public byte[] wrap(byte[] in, int inOff, int inLen)
From source file:com.github.horrorho.inflatabledonkey.crypto.AESWrap.java
License:Open Source License
public static byte[] wrap(byte[] keyEncryptionKey, byte[] unwrappedKey) { RFC3394WrapEngine engine = new RFC3394WrapEngine(new AESFastEngine()); engine.init(true, new KeyParameter(keyEncryptionKey)); return engine.wrap(unwrappedKey, 0, unwrappedKey.length); }
From source file:com.github.horrorho.inflatabledonkey.crypto.RFC3394Wrap.java
License:Open Source License
public static byte[] wrapAES(byte[] keyEncryptionKey, byte[] unwrappedKey) { RFC3394WrapEngine engine = new RFC3394WrapEngine(new AESFastEngine()); engine.init(true, new KeyParameter(keyEncryptionKey)); return engine.wrap(unwrappedKey, 0, unwrappedKey.length); }