Module: Labkit::Digest::SHA2

Defined in:
lib/labkit/fips.rb

Instance Method Summary collapse

Instance Method Details

#new(*args, &block) ⇒ Object



6
7
8
9
# File 'lib/labkit/fips.rb', line 6

def new(*args, &block)
  bitlen = args.first || 256
  ::OpenSSL::Digest.const_get("SHA#{bitlen}").new
end