Class: CryptoconditionsRuby::Crypto::HexEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptoconditions_ruby/crypto.rb

Instance Method Summary collapse

Instance Method Details

#decode(data) ⇒ Object



86
87
88
# File 'lib/cryptoconditions_ruby/crypto.rb', line 86

def decode(data)
  [data].pack('H*')
end

#encode(data) ⇒ Object



82
83
84
# File 'lib/cryptoconditions_ruby/crypto.rb', line 82

def encode(data)
  data.to_s.unpack('H*')[0]
end