Skip to content

Commit

Permalink
Add optimization to badCRC16.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacher09 committed Jan 19, 2012
1 parent 42b0d18 commit 2793ea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions decrypt_bios.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ function badCRC16(pwd, salt){
salt = (typeof(salt) == 'undefined') ? 0 : salt;
var hash = salt;
var c = 0;
for(c in pwd){
for(var c=0;c < pwd.length;c++){
hash ^= pwd[c] ;
for(var i=0;i<8;i++){
for(var i=8;i--;){
if(hash & 1){
hash = (hash >> 1) ^ 0x2001;
} else {
Expand Down

0 comments on commit 2793ea2

Please sign in to comment.