Class | Gem::DigestAdapter
In: | lib/rubygems/digest/digest_adapter.rb
Parent: | Object

There is an incompatibility between the way Ruby 1.8.5 and 1.8.6 handles digests. This DigestAdapter will take a pre-1.8.6 digest and adapt it to the 1.8.6 API.

Note that only the digest and hexdigest methods are adapted, since these are the only functions used by Gems.

### Methods

digest hexdigest new new

### Public Class methods

new(digest_class)

Initialize a digest adapter.

### Public Instance methods

digest(string)

Return the digest of `string` as a binary string.

hexdigest(string)

Return the digest of `string` as a hex string.

new()

Return a new digester. Since we are only implementing the stateless methods, we will return ourself as the instance.

[Validate]