public static <T> T decrypt(final Class<T> c, final TrPPKEncrypted<T> cipherText, final RSAPrivateKey privKey) {
final Cipher cipher = getRSACipher();
try {
cipher.init(Cipher.DECRYPT_MODE, privKey);
final TrSymKey aesKey = new TrSymKey(new ByteArraySegment(cipher.doFinal(cipherText.rsaEncryptedAesKey)));
final ByteArraySegment serializedPlainTextByteArray = aesKey.decrypt(cipherText.aesCypherText);
final DataInputStream dis = serializedPlainTextByteArray.toDataInputStream();
return TrSerializer.deserializeFrom(c, dis);
} catch (final Exception e) {
throw new RuntimeException(e);
}
}