Module: ObjectHash
- Defined in:
- lib/object_hash_rb.rb,
lib/object_hash_rb/version.rb
Overview
Contains functions which encode the input into a standardized format, then cryptographically hash it.
Constant Summary collapse
- Encode =
rubocop:disable Lint/SelfAssignment
Encode
- CryptoHash =
CryptoHash
- VERSION =
"0.1.3"
Class Method Summary collapse
-
.hash(input, algorithm: "sha1", replacer: nil, unordered_objects: true) ⇒ Object
Encode the input into a standardized format, then cryptographically hash it.
Class Method Details
.hash(input, algorithm: "sha1", replacer: nil, unordered_objects: true) ⇒ Object
Encode the input into a standardized format, then cryptographically hash it.
27 28 29 30 31 32 33 34 35 |
# File 'lib/object_hash_rb.rb', line 27 def hash(input, algorithm: "sha1", replacer: nil, unordered_objects: true) CryptoHash.perform_cryptohash( Encode::Encoder.new( replacer: replacer, unordered_objects: unordered_objects ).perform_encode(input), algorithm ) end |