I'm doing a pretty simple encode operation: I initialize the Cipher object by calling crypto.createCipheriv; then I call the update function once; and then the final function.
The documentation suggests that the final function is supposed to return any remaining bytes that need to be encrypted.
What actually happens is that the update function returns a buffer that is exactly equal in size to the buffer I'm trying to encrypt. Then the final function returns an extra 16 bytes. I don't know what these bytes are. I thought I had to concatenate the two buffers, but doing so results in a buffer that is 16 bytes longer than the original data.
I'm using a 16-byte initialization vector and I initially thought that the extra 16 bytes were those bytes, but they aren't.