diff --git a/app/src/org/commcare/android/nfc/NfcManager.java b/app/src/org/commcare/android/nfc/NfcManager.java index b360824e48..9d0235c2f3 100644 --- a/app/src/org/commcare/android/nfc/NfcManager.java +++ b/app/src/org/commcare/android/nfc/NfcManager.java @@ -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(); @@ -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();