background image

e.printStackTrace();
}
}

return

 null;

}

/** *//**
* Basic decrypt method
* @return byte[]
*/

protected

 byte[] decrypt(RSAPrivateKey privateKey, byte[] obj) ...{

if

 (privateKey != null) ...{

try

 ...{

Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.DECRYPT_MODE, privateKey);

return

 cipher.doFinal(obj);

catch

 (Exception e) ...{

e.printStackTrace();
}
}

return

 null;

}
}