Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
avazirna committed Jan 23, 2024
1 parent 7d66b9f commit 48aa5a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/org/commcare/android/nfc/NfcManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public String decryptValue(String message)
if (message.startsWith(payloadTag)) {
message = message.replace(payloadTag, "");
if (!StringUtils.isEmpty(encryptionKey)) {
message = EncryptionHelper.decryptWithBase64EncodedKey(message, encryptionKey);
message = EncryptionHelper.decryptWithEncodedKey(message, encryptionKey);
}
} else if (!allowUntaggedRead && !isEmptyPayloadTag(payloadTag)) {
throw new InvalidPayloadTagException();
Expand Down Expand Up @@ -98,7 +98,7 @@ public String tagAndEncryptPayload(String message)
}
String payload = message;
if (!StringUtils.isEmpty(encryptionKey)) {
payload = EncryptionHelper.encryptWithBase64EncodedKey(payload, encryptionKey);
payload = EncryptionHelper.encryptWithEncodedKey(payload, encryptionKey);
}
if (payload.contains(PAYLOAD_DELIMITER)) {
throw new InvalidPayloadException();
Expand Down

0 comments on commit 48aa5a5

Please sign in to comment.