use of org.spongycastle.crypto.encodings.OAEPEncoding in project SightRemote by TebbeUbben.
the class Cryptograph method processRSA.
private static byte[] processRSA(AsymmetricKeyParameter key, byte[] data, boolean encrypt) throws InvalidCipherTextException {
OAEPEncoding cipher = new OAEPEncoding(new RSAEngine());
cipher.init(encrypt, key);
return cipher.processBlock(data, 0, data.length);
}
Aggregations