class RbNaCl::PasswordHash::Argon2
def self.digest_size_value(digest_size)
-
(Integer)
- digest_size a valid value for digest size
Raises:
-
(LengthError)
- if the value is out of range
def self.digest_size_value(digest_size) digest_size = digest_size.to_i raise LengthError, "digest size too short" if digest_size < ARGON2_MIN_OUTLEN raise LengthError, "digest size too long" if digest_size > ARGON2_MAX_OUTLEN digest_size end