diff --git a/src/manifest.json b/src/manifest.json index 1f0f22a0..3f7be25c 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_extName__", "short_name": "__MSG_appName__", - "version": "1.9.2", + "version": "1.9.3", "description": "__MSG_extDesc__", "default_locale": "en", "author": "8bit Solutions LLC", diff --git a/src/services/cryptoService.js b/src/services/cryptoService.js index 500f783f..81bed737 100644 --- a/src/services/cryptoService.js +++ b/src/services/cryptoService.js @@ -207,7 +207,8 @@ function initCryptoService() { }; CryptoService.prototype.makeKey = function (password, salt, b64) { - var key = forge.pbkdf2(password, salt, 5000, 256 / 8, 'sha256'); + var key = forge.pbkdf2(forge.util.encodeUtf8(password), forge.util.encodeUtf8(salt), + 5000, 256 / 8, 'sha256'); if (b64 && b64 === true) { return forge.util.encode64(key); @@ -226,7 +227,7 @@ function initCryptoService() { throw 'Invalid parameters.'; } - var hashBits = forge.pbkdf2(key, password, 1, 256 / 8, 'sha256'); + var hashBits = forge.pbkdf2(key, forge.util.encodeUtf8(password), 1, 256 / 8, 'sha256'); callback(forge.util.encode64(hashBits)); }); };