Module: Bitcoin::BinaryExtensions

Included in:
String
Defined in:
lib/bitcoin.rb

Instance Method Summary collapse

Instance Method Details

#bthObject

bin-to-hex



539
# File 'lib/bitcoin.rb', line 539

def bth; unpack("H*")[0]; end

#htbObject

hex-to-bin



541
# File 'lib/bitcoin.rb', line 541

def htb; [self].pack("H*"); end

#htb_reverseObject



543
# File 'lib/bitcoin.rb', line 543

def htb_reverse; htb.reverse; end

#hthObject



544
# File 'lib/bitcoin.rb', line 544

def hth; unpack("H*")[0]; end

#reverse_hthObject



545
# File 'lib/bitcoin.rb', line 545

def reverse_hth; reverse.hth; end