Class: Immudb::KV
- Inherits:
-
Object
- Object
- Immudb::KV
- Defined in:
- lib/immudb/kv.rb
Instance Method Summary collapse
- #digest ⇒ Object
-
#initialize(key, value) ⇒ KV
constructor
A new instance of KV.
Constructor Details
#initialize(key, value) ⇒ KV
Returns a new instance of KV.
15 16 17 18 |
# File 'lib/immudb/kv.rb', line 15 def initialize(key, value) @key = key @value = value end |
Instance Method Details
#digest ⇒ Object
20 21 22 23 |
# File 'lib/immudb/kv.rb', line 20 def digest valdigest = Digest::SHA256.digest(@value.nil? ? "" : @value) Digest::SHA256.digest(@key + valdigest) end |