Class: Anyhash
- Inherits:
-
Object
- Object
- Anyhash
- Defined in:
- lib/anyhash.rb,
lib/anyhash/version.rb
Defined Under Namespace
Modules: Algorithms
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
Instance Method Summary collapse
- #hash(type) ⇒ Object
-
#initialize(message) ⇒ Anyhash
constructor
A new instance of Anyhash.
Constructor Details
#initialize(message) ⇒ Anyhash
Returns a new instance of Anyhash.
10 11 12 |
# File 'lib/anyhash.rb', line 10 def initialize() @message = end |
Class Method Details
.gost(message) ⇒ Object
22 23 24 |
# File 'lib/anyhash.rb', line 22 def self.gost() new().hash(Anyhash::Algorithms::GOST) end |
.gost_cryptopro(message) ⇒ Object
26 27 28 |
# File 'lib/anyhash.rb', line 26 def self.gost_cryptopro() new().hash(Anyhash::Algorithms::GOST_CRYPTOPRO) end |
Instance Method Details
#hash(type) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/anyhash.rb', line 14 def hash(type) create_tempfile hash = calculate_tempfile_hash_for(type) delete_tempfile hash end |