lib/rbnacl/password_hash.rb in rbnacl-7.1.1 vs lib/rbnacl/password_hash.rb in rbnacl-7.1.2

- old
+ new

@@ -30,10 +30,11 @@ # @param [Integer] digest_size of the output # # @raise [CryptoError] If calculating the digest fails for some reason. # # @return [String] The scrypt digest as raw bytes - def self.scrypt(password, salt, opslimit, memlimit, digest_size = 64) + def self.scrypt(password, salt, opslimit = SCrypt::OPSLIMIT_SENSITIVE, memlimit = SCrypt::MEMLIMIT_SENSITIVE, + digest_size = 64) SCrypt.new(opslimit, memlimit, digest_size).digest(password, salt) end # argon2: state of the art in the design of memory-hard hashing functions # (default digest algorithm).