SecretChallengeUtil<T> constructor
SecretChallengeUtil<T> ({
- required Argon2HashUtil hashUtil,
- Argon2HashUtil? completionTokenHash,
- required SecretChallengeVerificationConfig<
T> verificationConfig, - required SecretChallengeCompletionConfig<
T> completionConfig,
Creates a new SecretChallengeUtil instance.
verificationConfig is the configuration for verifying challenges.
completionConfig is the configuration for completing challenges.
hashUtil is the utility for hashing verification codes.
completionTokenHash hashes completion tokens, which are long and random
and suit Argon2HashUtil.forRandomSecrets. Defaults to hashUtil.
Implementation
SecretChallengeUtil({
required final Argon2HashUtil hashUtil,
final Argon2HashUtil? completionTokenHash,
required final SecretChallengeVerificationConfig<T> verificationConfig,
required final SecretChallengeCompletionConfig<T> completionConfig,
}) : _verificationConfig = verificationConfig,
_completionConfig = completionConfig,
_hashUtil = hashUtil,
_completionTokenHash = completionTokenHash ?? hashUtil;