Class: HashIdentifier::Chf
- Inherits:
-
Object
- Object
- HashIdentifier::Chf
- Defined in:
- lib/haiti/hash.rb
Overview
Cryptographic hash function object
Instance Attribute Summary collapse
-
#extended ⇒ Boolean
readonly
Display by default or not.
-
#hashcat ⇒ String
readonly
Hashcat hash ID.
-
#john ⇒ String
readonly
John the Ripper hash reference.
-
#name ⇒ String
readonly
Name of the identified hash type.
-
#samples ⇒ Array<String>
readonly
Examples of hashes.
Instance Method Summary collapse
-
#initialize(mode) ⇒ Chf
constructor
A new instance of Chf.
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
#extended ⇒ Boolean (readonly)
Returns 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 |
#hashcat ⇒ String (readonly)
Returns Hashcat hash ID. nil if unknown.
11 12 13 |
# File 'lib/haiti/hash.rb', line 11 def hashcat @hashcat end |
#john ⇒ String (readonly)
Returns John the Ripper hash reference. nil if unknown.
9 10 11 |
# File 'lib/haiti/hash.rb', line 9 def john @john end |
#name ⇒ String (readonly)
Returns name of the identified hash type.
7 8 9 |
# File 'lib/haiti/hash.rb', line 7 def name @name end |
#samples ⇒ Array<String> (readonly)
Returns Examples of hashes.
16 17 18 |
# File 'lib/haiti/hash.rb', line 16 def samples @samples end |