Created
March 4, 2011 07:23
-
-
Save harlantwood/854300 to your computer and use it in GitHub Desktop.
sha512 as 140-character node address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rb(main):057:0> sha512 = Digest::SHA512.hexdigest( "The quick brown fox jumps over the lazy dog" ) | |
=> "07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6" | |
irb(main):058:0> location = 'nodemap.org/' + sha512 | |
=> "nodemap.org/07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6" | |
irb(main):059:0> location.size | |
=> 140 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment