Search in sources :

Example 1 with RSAEngine

use of org.spongycastle.crypto.engines.RSAEngine 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);
}
Also used : OAEPEncoding(org.spongycastle.crypto.encodings.OAEPEncoding) RSAEngine(org.spongycastle.crypto.engines.RSAEngine)

Aggregations

OAEPEncoding (org.spongycastle.crypto.encodings.OAEPEncoding)1 RSAEngine (org.spongycastle.crypto.engines.RSAEngine)1