Module: Bip44::Utils
- Defined in:
- lib/bip44/utils.rb
Class Method Summary collapse
Class Method Details
.bin_to_hex(string) ⇒ Object
7 8 9 |
# File 'lib/bip44/utils.rb', line 7 def self.bin_to_hex(string) RLP::Utils.encode_hex string end |
.hex_to_bin(string) ⇒ Object
3 4 5 |
# File 'lib/bip44/utils.rb', line 3 def self.hex_to_bin(string) RLP::Utils.decode_hex string end |
.prefix_hex(hex) ⇒ Object
11 12 13 |
# File 'lib/bip44/utils.rb', line 11 def self.prefix_hex(hex) hex.match(/\A0x/) ? hex : "0x#{hex}" end |