Skip to content

Commit c065c79

Browse files
committed
browser: switch to utf-8
1 parent 3d569bc commit c065c79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ exports.pbkdf2 = function (password, salt, iterations, keylen, digest, callback)
1616
}
1717

1818
exports.pbkdf2Sync = function (password, salt, iterations, keylen, digest) {
19-
if (!Buffer.isBuffer(password)) password = new Buffer(password, 'binary')
20-
if (!Buffer.isBuffer(salt)) salt = new Buffer(salt, 'binary')
19+
if (!Buffer.isBuffer(password)) password = new Buffer(password, 'utf-8')
20+
if (!Buffer.isBuffer(salt)) salt = new Buffer(salt, 'utf-8')
2121

2222
checkParameters(iterations, keylen)
2323

0 commit comments

Comments
 (0)