While this note is useful for achieving compatibility with non-node.js crypto code, it contains implementation details which maybe outdated in the near future. Beware.
key arguments are expected to be binary strings which is bytes packed as chararacter codes of a string.
What this means is that only lower byte of each character will be used.
key argument will be hashed using MD5 and resized as needed to generate
algorithm specific key bytes and IV.
crypto.createCipheriv(algorithm, key, iv)
crypto.createDecipheriv(algorithm, key, iv)
These methods are, as of v0.4.2, undocumented.
iv argument is, like key, expected to be binary string.
Both key and iv arguments will be used as-is, meaning they have to
be right size for the requested algorithm. For example, for aes-256-ofb
algorithm, key.length should be 32 and iv.length should be 16.
As of v0.4.2, base64 output encoding is broken. Use hex or binary.