Example usage for org.bouncycastle.crypto.engines RFC3394WrapEngine wrap

List of usage examples for org.bouncycastle.crypto.engines RFC3394WrapEngine wrap

Introduction

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

Prototype

public byte[] wrap(byte[] in, int inOff, int inLen) 

Source Link

Usage

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);
}