Class: CryptoconditionsRuby::Types::BaseSha256Fulfillment

Inherits:
Fulfillment
  • Object
show all
Defined in:
lib/cryptoconditions_ruby/types/base_sha_256_fulfillment.rb

Constant Summary

Constants inherited from Fulfillment

Fulfillment::FEATURE_BITMASK, Fulfillment::REGEX, Fulfillment::TYPE_ID

Instance Method Summary collapse

Methods inherited from Fulfillment

#bitmask, #calculate_max_fulfillment_length, #condition, #condition_binary, #condition_uri, from_binary, from_dict, from_uri, #parse_dict, #parse_payload, #serialize_binary, #serialize_payload, #serialize_uri, #to_dict, #type_id, #validate, #write_payload

Methods included from Crypto::Helpers

#base64_add_padding, #base64_remove_padding, #ed25519_generate_key_pair

Instance Method Details

#generate_hashObject



4
5
6
7
8
# File 'lib/cryptoconditions_ruby/types/base_sha_256_fulfillment.rb', line 4

def generate_hash
  hasher = Utils::Hasher.new('sha256')
  write_hash_payload(hasher)
  hasher.digest
end

#write_hash_payload(_hasher) ⇒ Object



10
11
12
# File 'lib/cryptoconditions_ruby/types/base_sha_256_fulfillment.rb', line 10

def write_hash_payload(_hasher)
  raise 'Implement me'
end