Skip to content

Commit

Permalink
Fix for Implicit conversion from float 0.75 in createlm - fixes #193
Browse files Browse the repository at this point in the history
  • Loading branch information
leenooks committed Apr 1, 2023
1 parent d4b19d0 commit 30abeff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/createlm.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ private function smb_hash($in, $key, $forw){
$key2 = $this->str_to_key($key);

for ($i = 0; $i < 64; $i++) {
$inb[$i] = ($in[$i/8] & (1<<(7-($i%8)))) ? 1:0;
$keyb[$i] = ($key2[$i/8] & (1<<(7-($i%8)))) ? 1:0;
$inb[$i] = ($in[intdiv($i, 8)] & (1<<(7-($i%8)))) ? 1:0;
$keyb[$i] = ($key2[intdiv($i, 8)] & (1<<(7-($i%8)))) ? 1:0;
$outb[$i] = 0;
}
$outb = $this->doHash($inb, $keyb, $forw);
Expand All @@ -294,7 +294,7 @@ private function smb_hash($in, $key, $forw){
}
for ($i = 0; $i < 64; $i++) {
if ( $outb[$i] ) {
$out[$i/8] |= (1<<(7-($i%8)));
$out[intdiv($i, 8)] |= (1<<(7-($i%8)));
}
}
return $out;
Expand Down

0 comments on commit 30abeff

Please sign in to comment.