Class: Immudb::TXe

Inherits:
Object
  • Object
show all
Defined in:
lib/immudb/txe.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#h_valueObject

Returns the value of attribute h_value.



15
16
17
# File 'lib/immudb/txe.rb', line 15

def h_value
  @h_value
end

#keyObject

Returns the value of attribute key.



15
16
17
# File 'lib/immudb/txe.rb', line 15

def key
  @key
end

#key_lenObject

Returns the value of attribute key_len.



15
16
17
# File 'lib/immudb/txe.rb', line 15

def key_len
  @key_len
end

#v_offObject

Returns the value of attribute v_off.



15
16
17
# File 'lib/immudb/txe.rb', line 15

def v_off
  @v_off
end

#value_lenObject

Returns the value of attribute value_len.



15
16
17
# File 'lib/immudb/txe.rb', line 15

def value_len
  @value_len
end

Instance Method Details

#digestObject



22
23
24
25
# File 'lib/immudb/txe.rb', line 22

def digest
  b = @key + @h_value
  Digest::SHA256.digest(b)
end

#set_key(key) ⇒ Object



17
18
19
20
# File 'lib/immudb/txe.rb', line 17

def set_key(key)
  @key = key.dup
  @key_len = key.length
end