use of org.thoughtcrime.securesms.crypto.AsymmetricMasterCipher in project Signal-Android by WhisperSystems.
the class MasterSecretDecryptJob method getAsymmetricDecryptedBody.
private String getAsymmetricDecryptedBody(MasterSecret masterSecret, String body) throws InvalidMessageException {
try {
AsymmetricMasterSecret asymmetricMasterSecret = MasterSecretUtil.getAsymmetricMasterSecret(context, masterSecret);
AsymmetricMasterCipher asymmetricMasterCipher = new AsymmetricMasterCipher(asymmetricMasterSecret);
if (TextUtils.isEmpty(body))
return "";
else
return asymmetricMasterCipher.decryptBody(body);
} catch (IOException e) {
throw new InvalidMessageException(e);
}
}
Aggregations