You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
crypto: getDecoder throws "AssertionError: Cannot change encoding" when encoding is "ucs2", "ucs-2" or "utf-16le". #8236
The output_encoding specifies the output format of the enciphered data, and can be 'latin1', 'ascii' or 'utf8'.
the utf16le is not supported as output encoding, but it works if you specify 'utf16le'.
The change in lib/crypto.js fix the issue with utf-8, but not with utf-16le.
There is a function 'normalizeEncoding' in lib/internal/util.js that can be used to normalize the encoding.
Activity
addaleax commentedon Aug 23, 2016
Sounds like you can submit a pull request with that, if you like? There’s some info in https://github.com/nodejs/node/blob/master/CONTRIBUTING.md on how to do that.
jasnell commentedon Aug 26, 2016
@atstojanov ... are you interested in writing up a pull request for this?
atstoyanov commentedon Aug 27, 2016
@jasnell yes, I'm.
crypto: fix getDecoder() encoding check
crypto: fix getDecoder() encoding check