aboutsummaryrefslogtreecommitdiffstats
path: root/ext/digest/lib
Commit message (Collapse)AuthorAgeFilesLines
* * ext/digest/*: [DOC] Fix several typos and broken http links.zzak2013-11-132-3/+3
| | | | | | | | | | | Improved examples for Digest overview and fixed a broken example in Digest::HMAC overview. This patch also adds a description of Digest::SHA256.bubblebabble to the Digest overview. Patched by @stomar [Bug #9027] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest::Class.file): Take optionalknu2013-05-211-2/+4
| | | | | | | arguments that are passed to the constructor of the digest class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest: Improve documentation of Digest, Digest::HMAC anddrbrain2011-05-162-38/+71
| | | | | | | Digest::SHA2. Patch by Pete Higgins. [Ruby 1.9 - Bug #4702] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb: removed unused exception variablenahi2010-09-101-1/+1
| | | | | | | assignment to avoid a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb: Emit a deprecation warning inknu2010-06-031-0/+7
| | | | | | | | verbose mode and add a caution to the overview section of the document. [ruby-dev:41525] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_hexdigest_bang): Fixknu2010-01-171-0/+26
| | | | | | | | | | | rdoc. * ext/digest/lib/digest.rb (Digest::Class.base64digest) (Digest::Instance#base64digest{,!}): New methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): fasternobu2009-08-141-5/+5
| | | | | | | code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-062-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): useakr2008-01-041-1/+1
| | | | | | | String#bytesize to avoid test errors on EUC-JP environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest::self.const_missing): avoidmatz2007-07-281-2/+4
| | | | | | infinite recursive const_missing call. [ruby-talk:262193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest::self.const_missing): Dropknu2007-02-141-8/+10
| | | | | | | | autoloads for sha2 classes in favor of handling in const_missing(), to work around a problem exposed on OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Do alias << update.knu2006-12-041-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb: Fix problems with updateknu2006-12-031-2/+6
| | | | | | | timing. [Reported by: oss-ruby@technorama.net] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb (Digest::HMAC::update): Minorknu2006-11-011-1/+2
| | | | | | | | | | optimization. * ext/digest/digest.c (rb_digest_instance_equal): Allow comparing a digest instance with another of a different class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb: Follow the framework updates.knu2006-10-211-5/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb: Complete half-boiled updates.knu2006-10-201-8/+9
| | | | | | | * ext/digest/sha2/lib/digest/sha2.rb: Fix #initialize_clone(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest: Prefix C constants with RUBY_ and C type names withknu2006-10-202-34/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | rb_ to avoid name clash in writing extensions. * ext/digest: Introduce Digest::Class and Digest::Instance for ease of implementing subclasses and add-ons, inspried by gotoyuzo. * ext/digest: The Digest::Instance module now requires and assumes that any instance be resettable and clonable, and add some convenient instance methods such as "new()", for creating a new copy, parameter taking "digest()" and "hexdigest()", for instant calculation. These methods make digest instances work just like digest classes. * ext/digest/sha2/lib/digest/sha2.rb: Add the Digest::SHA2 class to wrap up SHA2 variants: SHA256, SHA384 and SHA512, hoping this module would make a decent example of a digest subclass written in Ruby. * ext/digest/lib/digest.rb: Adjust autoload entries for SHA2 classes. * ext/digest/lib/digest/hmac.rb: Follow the framework updates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c, ext/digest/digest.h,knu2006-10-131-48/+61
| | | | | | | | | | | | | | | | | | | | | ext/digest/md5/md5init.c, ext/digest/rmd160/rmd160init.c, ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c: Introduce API versioning. * ext/digest/digest.c, ext/digest/digest.h, ext/digest/md5/md5init.c, ext/digest/rmd160/rmd160init.c, ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c: Remove the constants DIGEST_LENGTH and BLOCK_LENGTH and turn them into instance methods digest_length() and block_length(). Class methods with the same names are also provided, which take extra parameters for a digest method. * ext/digest/lib/digest/hmac.rb: Completely redesign the API which is similar to Perl's, now that Digest classes can take hashing parameters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest): Try to auto-load non-standardknu2006-10-131-3/+15
| | | | | | | | | | digest modules when a specified digest class is missing. * ext/digest/lib/digest.rb: Define Digest(name) for ease of dynamically selecting a hashing algorithm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb: Make use of String#bytes.knu2006-10-111-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb: Add digest/hmac, which implementsknu2006-10-111-0/+263
| | | | | | | HMAC keyed-hashing algorithm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/md5.rb, ext/digest/lib/sha1.rb: Remove thoseknu2006-10-052-28/+0
| | | | | | | compatibility stub libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest): Require digest.so and fix theknu2006-09-291-0/+2
| | | | | | | breakage. Point out by NAKAMURA Usaku in [ruby-dev:29619]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest::Base.file): open a file in binaryakr2006-09-141-1/+1
| | | | | | | mode. suggested by Kazuhiro NISHIYAMA. [ruby-dev:29579] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a document for Digest::Base.file.akr2006-09-141-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest::Base.file): new method.akr2006-09-141-0/+13
| | | | | | | [ruby-dev:29572] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb: new file.akr2006-09-131-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Import the "digest" module and the submodules, from the Rough Rubyknu2001-07-132-0/+28
project. ext/digest: This module provides the module Digest and the abstract class Digest::Base. ext/digest/md5 (which obsoletes ext/md5): This module provides the class Digest::MD5 which implements the MD5 Message-Digest Algorithm. ext/digest/rmd160: This module provides the class Digest::RMD160 which implements the RIPEMD-160 cryptographic hash function. ext/digest/sha1 (which obsoletes ext/sha1): This module provides the class Digest::SHA1 which implements the SHA-1 Secure Hash Algorithm. ext/digest/sha2: This module provides the classes Digest::SHA256, Digest::SHA384 and Digest::SHA512 which implement the SHA-256, SHA-384 and SHA-512 Secure Hash Algorithms, respectively. lib/md5.rb, lib/sha1.rb: These files are provided for backward compatibility. All these classes have the common API, which previously ext/md5 and ext/sha1 modules provided. While the new API keeps 100% backward compatibility, it has been enriched with several utility methods. Read digest.txt for further details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e