AsymmetricBlockCipher eng = new PKCS1Encoding(new RSAEngine());
eng.init(true, publicKey);
byte[] input = raw.getBytes();
return eng.processBlock(input, 0, input.length);
}
public static String decrypt(RSAPrivateCrtKeyParameters privateKey, byte[] encrypted) throws InvalidCipherTextException {
AsymmetricBlockCipher eng = new PKCS1Encoding(new RSAEngine());
eng.init(false, privateKey);