class String

Public Instance Methods

hexi() click to toggle source
# File bin/cert-to-cwt.rb, line 7
def hexi
  bytes.map{|x| "%02x" % x}.join
end
hexs() click to toggle source
# File bin/cert-to-cwt.rb, line 10
def hexs
  bytes.map{|x| "%02x" % x}.join(" ")
end
xeh() click to toggle source
# File bin/cert-to-cwt.rb, line 13
def xeh
  gsub(/\s/, "").chars.each_slice(2).map{ |x| Integer(x.join, 16).chr("BINARY") }.join
end