Class: Exonum::SignatureT

Inherits:
Object
  • Object
show all
Defined in:
lib/exonum/types/primitive.rb

Class Method Summary collapse

Class Method Details

.fixed?Boolean

Returns:

  • (Boolean)


249
250
251
# File 'lib/exonum/types/primitive.rb', line 249

def self.fixed?
  true
end

.serialize(value, buffer, from, shift = 0) ⇒ Object



253
254
255
256
257
258
259
# File 'lib/exonum/types/primitive.rb', line 253

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

.sizeObject



245
246
247
# File 'lib/exonum/types/primitive.rb', line 245

def self.size
  64
end