/// <summary> /// Creates a SaltedHasher, configuring it to use the specified hashing provider, salt position and salt length, and password generator /// </summary> /// <param name="provider">Hash algorithm to use by default</param> /// <param name="saltLength">Length for the salt</param> /// <param name="saltPosition">Position for the salt</param> /// <param name="passwordGenerator">Password generator for generating the salts</param> SaltedHasher(HashProvider provider, int saltLength, SaltPosition saltPosition, PasswordGenerator passwordGenerator) { Provider = provider; SaltPosition = saltPosition; SaltLength = saltLength; PasswordGenerator = passwordGenerator; }
/// <summary> /// Creates a SaltedHasher, configuring it to use the specified hashing provider, salt position and salt length /// </summary> /// <param name="provider">Hash algorithm to use by default</param> /// <param name="saltLength">Length for the salt</param> /// <param name="saltPosition">Position for the salt</param> public SaltedHasher(HashProvider provider, int saltLength, SaltPosition saltPosition) : this(provider, saltLength, saltPosition, new PasswordGenerator()) { }