1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

outdated browser and edge checks for pbkdf2

This commit is contained in:
Kyle Spearrin
2017-07-09 00:23:26 -04:00
parent b9cbc1546c
commit 204ee72926
3 changed files with 12 additions and 2 deletions

View File

@@ -235,7 +235,7 @@ angular
};
_service.makeKey = function (password, salt) {
if (!$window.cryptoShimmed) {
if (!$window.cryptoShimmed && $window.navigator.userAgent.indexOf('Edge') === -1) {
return pbkdf2WC(password, salt, 5000, 256).then(function (keyBuf) {
return new SymmetricCryptoKey(bufToB64(keyBuf), true);
});
@@ -301,7 +301,7 @@ angular
throw 'Invalid parameters.';
}
if (!$window.cryptoShimmed) {
if (!$window.cryptoShimmed && $window.navigator.userAgent.indexOf('Edge') === -1) {
var keyBuf = key.getBuffers();
return pbkdf2WC(new Uint8Array(keyBuf.key), password, 1, 256).then(function (hashBuf) {
return bufToB64(hashBuf);