U:RDoc::NormalModule[iI" Digest:ET@0o:RDoc::Markup::Document: @parts[ o;;[: @fileI"+ext/digest/bubblebabble/bubblebabble.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"CThis module provides a framework for message digest libraries.;To:RDoc::Markup::BlankLineo; ;[I"LYou may want to look at OpenSSL::Digest as it supports more algorithms.;T@o; ;[ I"PA cryptographic hash function is a procedure that takes data and returns a ;TI"Nfixed bit string: the hash value, also known as _digest_. Hash functions ;TI"Lare also called one-way functions, it is easy to compute a digest from ;TI"Ia message, but it is infeasible to generate a message from a digest.;T@S:RDoc::Markup::Heading: leveli: textI" Examples;T@o:RDoc::Markup::Verbatim;[I"require 'digest' ;TI" ;TI"!# Compute a complete digest ;TI"EDigest::SHA256.digest 'message' #=> "\xABS\n\x13\xE4Y..." ;TI" ;TI"!sha256 = Digest::SHA256.new ;TI"Esha256.digest 'message' #=> "\xABS\n\x13\xE4Y..." ;TI" ;TI"# Other encoding formats ;TI"ADigest::SHA256.hexdigest 'message' #=> "ab530a13e459..." ;TI"ADigest::SHA256.base64digest 'message' #=> "q1MKE+RZFJgr..." ;TI" ;TI" # Compute digest by chunks ;TI"md5 = Digest::MD5.new ;TI"md5.update 'message1' ;TI"Gmd5 << 'message2' # << is an alias for update ;TI" ;TI"Amd5.hexdigest #=> "94af09c09bb9..." ;TI" ;TI"!# Compute digest for a file ;TI"-sha256 = Digest::SHA256.file 'testfile' ;TI"sha256.hexdigest ;T: @format0o; ;[I"QAdditionally digests can be encoded in "bubble babble" format as a sequence ;TI"Oof consonants and vowels which is more recognizable and comparable than a ;TI"hexadecimal digest.;T@o;;[I"#require 'digest/bubblebabble' ;TI" ;TI"GDigest::SHA256.bubblebabble 'message' #=> "xopoh-fedac-fenyh-..." ;T;0o; ;[I",See the bubble babble specification at ;TI"Thttp://web.mit.edu/kenta/www/one/bubblebabble/spec/jrtrjwzi/draft-huima-01.txt.;T@S; ;i;I"Digest algorithms;T@o; ;[I"CDifferent digest algorithms (or hash functions) are available:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"MD5;T;[o; ;[I"2See RFC 1321 The MD5 Message-Digest Algorithm;To;;[I"RIPEMD-160;T;[o; ;[I"As Digest::RMD160. ;TI"@See http://homes.esat.kuleuven.be/~bosselae/ripemd160.html.;To;;[I" SHA1;T;[o; ;[I"'See FIPS 180 Secure Hash Standard.;To;;[I"SHA2 family;T;[o; ;[I"NSee FIPS 180 Secure Hash Standard which defines the following algorithms:;To;;: BULLET;[o;;0;[o; ;[I" SHA512;To;;0;[o; ;[I" SHA384;To;;0;[o; ;[I" SHA256;T@o; ;[I"EThe latest versions of the FIPS publications can be found here: ;TI"5http://csrc.nist.gov/publications/PubsFIPS.html.;T; I"ext/digest/digest.c;T; 0o;;[; I"ext/digest/lib/digest.rb;T; 0o;;[; I"ext/digest/md5/md5init.c;T; 0o;;[; I"#ext/digest/rmd160/rmd160init.c;T; 0o;;[; I"ext/digest/sha1/sha1init.c;T; 0; 0; 0[[U:RDoc::Constant[iI"REQUIRE_MUTEX;FI"Digest::REQUIRE_MUTEX;T00o;;[o; ;[I"A mutex for Digest().;T; @{; 0@{@cRDoc::NormalModule0[[[I" class;T[[: public[[I"bubblebabble;TI"+ext/digest/bubblebabble/bubblebabble.c;T[I"hexencode;TI"ext/digest/digest.c;T[:protected[[: private[[I" instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ @}@{@~@@I"lib/cgi/session.rb;TI"lib/cgi/session/pstore.rb;TI"lib/net/imap.rb;TI"lib/net/pop.rb;TI"lib/net/smtp.rb;TI"'lib/rubygems/package/tar_writer.rb;TI"lib/rubygems/source/git.rb;TI"'lib/webrick/httpauth/digestauth.rb;T@cRDoc::TopLevel