Class: HashIdentifier::Chf

Inherits:
Object
  • Object
show all
Defined in:
lib/haiti/hash.rb

Overview

Cryptographic hash function object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode) ⇒ Chf

Returns a new instance of Chf.



18
19
20
21
22
23
24
# File 'lib/haiti/hash.rb', line 18

def initialize(mode)
  @name = mode['name']
  @john = mode['john']
  @hashcat = mode['hashcat']
  @extended = mode['extended']
  @samples = mode['samples']
end

Instance Attribute Details

#extendedBoolean (readonly)

Returns Display by default or not. If true it is displayed in extended mode only, mostly hash type using salt.

Returns:

  • (Boolean)

    Display by default or not. If true it is displayed in extended mode only, mostly hash type using salt.



14
15
16
# File 'lib/haiti/hash.rb', line 14

def extended
  @extended
end

#hashcatString (readonly)

Returns Hashcat hash ID. nil if unknown.

Returns:

  • (String)

    Hashcat hash ID. nil if unknown.



11
12
13
# File 'lib/haiti/hash.rb', line 11

def hashcat
  @hashcat
end

#johnString (readonly)

Returns John the Ripper hash reference. nil if unknown.

Returns:

  • (String)

    John the Ripper hash reference. nil if unknown.



9
10
11
# File 'lib/haiti/hash.rb', line 9

def john
  @john
end

#nameString (readonly)

Returns name of the identified hash type.

Returns:

  • (String)

    name of the identified hash type



7
8
9
# File 'lib/haiti/hash.rb', line 7

def name
  @name
end

#samplesArray<String> (readonly)

Returns Examples of hashes.

Returns:

  • (Array<String>)

    Examples of hashes



16
17
18
# File 'lib/haiti/hash.rb', line 16

def samples
  @samples
end