From: Joshua Bassett Date: 2007-10-31T10:56:46+09:00 Subject: Re: (BitTorrent-related) binary "string" to hexadecimal? Hi Shanti, > I still have no clue what a "hex nibble" is but it does the trick in a > pinch! =) A "hex nibble" is half a byte represented in hexadecimal. In other words, a byte (8 bits) is made up of two (4 bit) nibbles (a most significant and a least significant) and in hexadecimal numbering each nibble corresponds to a hexadecimal digit. For example, the byte 0xFE (1111 1110) is composed of two nibbles: F (1111), the most significant, and E (1110), the least significant. The ruby function digest.unpack('H*') unpacks the binary string "digest" into a string of hex bytes with the most significant nibble written before the least significant. Hope that makes things a bit clearer for you. Josh -- Posted via http://www.ruby-forum.com/.