def self.const_missing(name)
when :SHA256, :SHA384, :SHA512
lib = File.join('digest', name.to_s.downcase)
raise LoadError, "library not found for class Digest::#{name} -- #{lib}", caller(1)
unless Digest.const_defined?(name)
raise NameError, "uninitialized constant Digest::#{name}", caller(1)
# creates a digest object and reads a given file, _name_.
# p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest
# # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
# updates the digest with the contents of a given file _name_ and
File.open(name, "rb") {|f|