private static final Logger logger = LoggerFactory.getLogger(ProfileUtils.class);
- public static Profile decryptProfile(
- final ProfileKey profileKey, final SignalServiceProfile encryptedProfile
- ) {
+ public static Profile decryptProfile(final ProfileKey profileKey, final SignalServiceProfile encryptedProfile) {
var profileCipher = new ProfileCipher(profileKey);
IdentityKey identityKey = null;
try {
}
public static Profile.UnidentifiedAccessMode getUnidentifiedAccessMode(
- final SignalServiceProfile encryptedProfile, final ProfileCipher profileCipher
+ final SignalServiceProfile encryptedProfile,
+ final ProfileCipher profileCipher
) {
if (encryptedProfile.isUnrestrictedUnidentifiedAccess()) {
return Profile.UnidentifiedAccessMode.UNRESTRICTED;
}
private static String decryptString(
- final String encrypted, final ProfileCipher profileCipher
+ final String encrypted,
+ final ProfileCipher profileCipher
) throws InvalidCiphertextException {
try {
return encrypted == null ? null : profileCipher.decryptString(Base64.getDecoder().decode(encrypted));
}
private static Optional<Boolean> decryptBoolean(
- final String encrypted, final ProfileCipher profileCipher
+ final String encrypted,
+ final ProfileCipher profileCipher
) throws InvalidCiphertextException {
try {
return encrypted == null
}
private static byte[] decryptAndVerifyMobileCoinAddress(
- final byte[] encryptedPaymentAddress, final ProfileCipher profileCipher, final ECPublicKey publicKey
+ final byte[] encryptedPaymentAddress,
+ final ProfileCipher profileCipher,
+ final ECPublicKey publicKey
) throws InvalidCiphertextException {
byte[] decrypted;
try {