mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-11 00:01:16 +00:00
Rename -m 18700 to Java Object hashCode()
This commit is contained in:
parent
b01038b8f4
commit
b4d52e412b
@ -115,7 +115,7 @@ __kernel void m18700_m04 (KERN_ATTR_BASIC ())
|
|||||||
w[15] = wordl3[3] | wordr3[3];
|
w[15] = wordl3[3] | wordr3[3];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* djb
|
* hashCode()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
u32x hash = 0;
|
u32x hash = 0;
|
||||||
@ -260,7 +260,7 @@ __kernel void m18700_s04 (KERN_ATTR_BASIC ())
|
|||||||
w[15] = wordl3[3] | wordr3[3];
|
w[15] = wordl3[3] | wordr3[3];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* djb
|
* hashCode()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
u32x hash = 0;
|
u32x hash = 0;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
- Added hash-mode 18400 (Open Document Format (ODF) 1.2 (SHA-256, AES))
|
- Added hash-mode 18400 (Open Document Format (ODF) 1.2 (SHA-256, AES))
|
||||||
- Added hash-mode 18500 sha1(md5(md5($pass)))
|
- Added hash-mode 18500 sha1(md5(md5($pass)))
|
||||||
- Added hash-mode 18600 (Open Document Format (ODF) 1.1 (SHA-1, Blowfish))
|
- Added hash-mode 18600 (Open Document Format (ODF) 1.1 (SHA-1, Blowfish))
|
||||||
- Added hash-mode 18700 DJB 32
|
- Added hash-mode 18700 Java Object hashCode()
|
||||||
|
|
||||||
##
|
##
|
||||||
## Bugs
|
## Bugs
|
||||||
|
@ -61,7 +61,7 @@ NVIDIA GPUs require "NVIDIA Driver" (367.x or later)
|
|||||||
- GOST R 34.11-94
|
- GOST R 34.11-94
|
||||||
- GOST R 34.11-2012 (Streebog) 256-bit
|
- GOST R 34.11-2012 (Streebog) 256-bit
|
||||||
- GOST R 34.11-2012 (Streebog) 512-bit
|
- GOST R 34.11-2012 (Streebog) 512-bit
|
||||||
- DJB 32
|
- Java Object hashCode()
|
||||||
- md5($pass.$salt)
|
- md5($pass.$salt)
|
||||||
- md5($salt.$pass)
|
- md5($salt.$pass)
|
||||||
- md5(utf16le($pass).$salt)
|
- md5(utf16le($pass).$salt)
|
||||||
|
@ -18,7 +18,7 @@ static const u32 DGST_POS2 = 2;
|
|||||||
static const u32 DGST_POS3 = 3;
|
static const u32 DGST_POS3 = 3;
|
||||||
static const u32 DGST_SIZE = DGST_SIZE_4_4;
|
static const u32 DGST_SIZE = DGST_SIZE_4_4;
|
||||||
static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH;
|
static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH;
|
||||||
static const char *HASH_NAME = "DJB 32";
|
static const char *HASH_NAME = "Java Object hashCode()";
|
||||||
static const u64 KERN_TYPE = 18700;
|
static const u64 KERN_TYPE = 18700;
|
||||||
static const u32 OPTI_TYPE = OPTI_TYPE_RAW_HASH;
|
static const u32 OPTI_TYPE = OPTI_TYPE_RAW_HASH;
|
||||||
static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE;
|
static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE;
|
||||||
|
@ -10,8 +10,10 @@ use warnings;
|
|||||||
|
|
||||||
sub module_constraints { [[0, 255], [-1, -1], [0, 55], [-1, -1], [-1, -1]] }
|
sub module_constraints { [[0, 255], [-1, -1], [0, 55], [-1, -1], [-1, -1]] }
|
||||||
|
|
||||||
sub djb32
|
sub hashCode
|
||||||
{
|
{
|
||||||
|
use integer;
|
||||||
|
|
||||||
my $word = shift;
|
my $word = shift;
|
||||||
|
|
||||||
my @chars = unpack ("C*", $word);
|
my @chars = unpack ("C*", $word);
|
||||||
@ -20,18 +22,17 @@ sub djb32
|
|||||||
|
|
||||||
while (my $c = shift @chars)
|
while (my $c = shift @chars)
|
||||||
{
|
{
|
||||||
$hash = ($hash * 31) & 0xffffffff;
|
$hash = ($hash * 31) + $c;
|
||||||
$hash = ($hash + $c) & 0xffffffff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $hash;
|
return $hash & 0xffffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub module_generate_hash
|
sub module_generate_hash
|
||||||
{
|
{
|
||||||
my $word = shift;
|
my $word = shift;
|
||||||
|
|
||||||
my $digest = djb32 ($word);
|
my $digest = hashCode ($word);
|
||||||
|
|
||||||
my $hash = sprintf ("%08x", $digest);
|
my $hash = sprintf ("%08x", $digest);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user