diff --git a/bitaddress.org.html b/bitaddress.org.html
index 59cd96b..c81fa62 100644
--- a/bitaddress.org.html
+++ b/bitaddress.org.html
@@ -1653,14 +1653,17 @@ if (typeof Crypto == "undefined" || !Crypto.util) {
entropyStr += pluginsStr + mimeTypesStr;
// cookies and storage: 1 bit
entropyStr += navigator.cookieEnabled + typeof (sessionStorage) + typeof (localStorage);
+ // language: ~7 bit
+ entropyStr += navigator.language;
+ // history: ~2 bit
+ entropyStr += window.history.length;
+ // location
+ entropyStr += window.location;
var entropyBytes = Crypto.SHA256(entropyStr, { asBytes: true });
- sr.seedInt8(entropyBytes[0]);
- sr.seedInt8(entropyBytes[1]);
- sr.seedInt8(entropyBytes[2]);
- sr.seedInt8(entropyBytes[3]);
- sr.seedInt8(entropyBytes[4]);
- sr.seedInt8(entropyBytes[5]);
+ for (var i = 0 ; i < entropyBytes.length ; i++) {
+ sr.seedInt8(entropyBytes[i]);
+ }
}
})();
diff --git a/src/securerandom.js b/src/securerandom.js
index 532e3b6..4d1d800 100644
--- a/src/securerandom.js
+++ b/src/securerandom.js
@@ -166,13 +166,16 @@
entropyStr += pluginsStr + mimeTypesStr;
// cookies and storage: 1 bit
entropyStr += navigator.cookieEnabled + typeof (sessionStorage) + typeof (localStorage);
+ // language: ~7 bit
+ entropyStr += navigator.language;
+ // history: ~2 bit
+ entropyStr += window.history.length;
+ // location
+ entropyStr += window.location;
var entropyBytes = Crypto.SHA256(entropyStr, { asBytes: true });
- sr.seedInt8(entropyBytes[0]);
- sr.seedInt8(entropyBytes[1]);
- sr.seedInt8(entropyBytes[2]);
- sr.seedInt8(entropyBytes[3]);
- sr.seedInt8(entropyBytes[4]);
- sr.seedInt8(entropyBytes[5]);
+ for (var i = 0 ; i < entropyBytes.length ; i++) {
+ sr.seedInt8(entropyBytes[i]);
+ }
}
})();
\ No newline at end of file