/// <summary>
 /// Creates a PaswordHasher with custom options.
 /// </summary>
 /// <param name="options"></param>
 public PasswordHasher(PasswordHasherOptions options) : this(null, options)
 {
 }
 /// <summary>
 /// Creates a PaswordHasher with a specified algorithm and custom options
 /// </summary>
 /// <param name="algorithm"></param>
 /// <param name="options"></param>
 public PasswordHasher(HashAlgorithm algorithm = null, PasswordHasherOptions options = null)
 {
     _hasher = algorithm != null ? new Hasher(algorithm) : new Hasher(SHA256.Create());
     Options = PasswordHasherOptions.CreateMergedInstance(options);
 }
Esempio n. 3
0
        public static PasswordHasherOptions CreateMergedInstance(PasswordHasherOptions options = null)
        {
            PasswordHasherOptions result = DefaultOptionsBuilder.MergeOptions <PasswordHasherOptions>(GlobalCryptographyOptions.PasswordHasherOptions, options);

            return(result);
        }