diff options
Diffstat (limited to 'lib/crypto.js')
-rw-r--r-- | lib/crypto.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto.js b/lib/crypto.js index 9ffff06f7f..16a8524f84 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -100,7 +100,7 @@ Hmac.prototype._transform = Hash.prototype._transform; function getDecoder(decoder, encoding) { - if (encoding === 'utf-8') encoding = 'utf8'; // Normalize encoding. + encoding = internalUtil.normalizeEncoding(encoding); decoder = decoder || new StringDecoder(encoding); assert(decoder.encoding === encoding, 'Cannot change encoding'); return decoder; |