Examining different implementations of encryption / decryption with cipher on Node.js, I paid attention that some implementations use hex
encoding:
let encrypted = cipher.update(value, "utf8", "hex");
while other prefer base64
:
let encrypted = cipher.update(value, "utf8", "base64");
Questions:
- Does encoding choice play a significant role in encryption for a cipher?
- From security point of view, can the wrong encoding choice affect the outcome?