Feature #6819

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

 (({})) allows you to create a digest given the digest name: 

   digester = "SHA1" 
   digester.update "hello" 
   # … 

 The digester returned is of class (({OpenSSL::Digest})) OpenSSL::Digest regardless of the input type. 

 I would like this changed so that it returns the specific subclass of (({OpenSSL::Digest})): OpenSSL::Digest: 

   digester = "SHA1" 
   digester.class #=> OpenSSL::Digest::SHA1 

 When multiple digests are created this makes it easier to distinguish the type of digest you are working with. 

 This will also make (({})) behave similarly to (({Digest})): Digest: 

   digester = Digest("SHA1").new 
   digester.class #=> Digest::SHA1