Class: Exonum::PublicKeyT
- Inherits:
-
Object
- Object
- Exonum::PublicKeyT
- Defined in:
- lib/exonum/types/primitive.rb
Class Method Summary collapse
Class Method Details
.fixed? ⇒ Boolean
213 214 215 |
# File 'lib/exonum/types/primitive.rb', line 213 def self.fixed? true end |
.serialize(value, buffer, from, shift = 0) ⇒ Object
217 218 219 220 221 222 223 |
# File 'lib/exonum/types/primitive.rb', line 217 def self.serialize value, buffer, from, shift=0 raise "Expecting #{size} bytes in hex" unless value.is_a?(String) and value.length == size*2 [value].pack('H*').bytes.each do |byte| buffer[from] = byte from += 1 end end |
.size ⇒ Object
209 210 211 |
# File 'lib/exonum/types/primitive.rb', line 209 def self.size 32 end |