Method: Elixir::Base.encode16

Defined in:
lib/elixir/base.rb

.encode16(data, char_case: :upper) ⇒ Object



63
64
65
66
67
# File 'lib/elixir/base.rb', line 63

def encode16 data, char_case: :upper
  encoded = data.unpack('H*').first

  char_case == :upper ? encoded.upcase : encoded
end