mirror of
https://github.com/hashcat/hashcat.git
synced 2025-05-29 04:08:48 +00:00
Prepare IV support in unit test for -m 11500
This commit is contained in:
parent
660e451689
commit
799bc0abe4
@ -8,17 +8,31 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Digest::CRC qw (crc32);
|
use Digest::CRC;
|
||||||
|
|
||||||
sub module_constraints { [[-1, -1], [-1, -1], [0, 31], [8, 8], [-1, -1]] }
|
sub module_constraints { [[-1, -1], [-1, -1], [0, 31], [8, 8], [-1, -1]] }
|
||||||
|
|
||||||
sub module_generate_hash
|
sub module_generate_hash
|
||||||
{
|
{
|
||||||
my $word = shift;
|
my $word = shift;
|
||||||
|
my $salt = shift;
|
||||||
|
|
||||||
my $digest = crc32 ($word);
|
$salt = "00000000";
|
||||||
|
|
||||||
my $hash = sprintf ("%08x:00000000", $digest);
|
my $ctx = Digest::CRC->new
|
||||||
|
(
|
||||||
|
width => 32,
|
||||||
|
init => hex ($salt),
|
||||||
|
xorout => 0xffffffff,
|
||||||
|
refout => 1,
|
||||||
|
poly => 0x04c11db7,
|
||||||
|
refin => 1,
|
||||||
|
cont => 1
|
||||||
|
);
|
||||||
|
|
||||||
|
$ctx->add ($word);
|
||||||
|
|
||||||
|
my $hash = sprintf ("%s:%s", $ctx->hexdigest (), $salt);
|
||||||
|
|
||||||
return $hash;
|
return $hash;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user