lib/megar/crypto/support.rb
def hexstr_to_bstr(h)
    bstr = ''
    (0..h.length-1).step(2) {|n| bstr << h[n,2].to_i(16).chr }
    bstr
  end
# Returns a binary string given a string +h+ of hex digits
Returns a binary string given a string +h+ of hex digits
Returns a binary string given a string + h + of hex digits
def hexstr_to_bstr(h)
    bstr = ''
    (0..h.length-1).step(2) {|n| bstr << h[n,2].to_i(16).chr }
    bstr
  end
def hexstr_to_bstr ( h ) bstr = '' ( 0 .. h . length - 1 ) . step ( 2 ) { | n | bstr << h [ n , 2 ] . to_i ( 16 ) . chr } bstr end
Returns a binary string given a string +h+ of hex digits
Returns a binary string given a string + h + of hex digits
h