class Digest::Class

Public Class Methods

base64digest(str, *args) click to toggle source

Returns the base64 encoded hash value of a given string. The return value is properly padded with ‘=’ and contains no line feeds.

# File rake/lib/digest.rb, line 35
def self.base64digest(str, *args)
  [digest(str, *args)].pack('m0')
end
file(name) click to toggle source

creates a digest object and reads a given file, name.

p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
# => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
# File rake/lib/digest.rb, line 28
def self.file(name)
  new.file(name)
end