Module: SimplyAES::Format::Hex

Extended by:
Hex
Includes:
SimplyAES::Format
Included in:
Hex
Defined in:
lib/simply-aes/format.rb

Overview

A Hex implementation of SimplyAES::Format that emits strings without newlines and can handle concatenated-hex strings

Instance Method Summary collapse

Methods included from SimplyAES::Format

[], []=, included

Instance Method Details

#dump(bytestring) ⇒ Object



77
78
79
# File 'lib/simply-aes/format.rb', line 77

def dump(bytestring)
  bytestring.unpack('H*')[0]
end

#load(formatted) ⇒ Object



73
74
75
# File 'lib/simply-aes/format.rb', line 73

def load(formatted)
  [formatted].pack('H*')
end