wrote a node encryption and decryption demo, encountered encoding problems. createCipheriv
and createDecipheriv
methods are used for encryption and decryption respectively
node version
343d083990e4a863597ebc429e69552f
hello world
two questions
1 how to determine the length of key and iv corresponding to encryption algorithms such as CBC, and what role do key and iv play in encryption respectively? When
2, the output code is utf8
, why is the output garbled like 49 "cY~" B "iU/
?