autotelic / envelope-encryptor

MIT License
1 stars 0 forks source link

fix: Specify encrypt cipher.update to specify output encoding #9

Closed jkirkpatrick24 closed 3 years ago

jkirkpatrick24 commented 3 years ago

When encrypting a message, we were not specifying the output encoding when updating the cipher. This was causing an issue with the ciper padding length due to a mismatch of encodings. The result of this was any attempt to encrypt & decrypt text longer than 15 characters would fail. We now specify the output encoding when calling cipher.update to fix the issue.