public HashedPassword(byte[] hash, byte[] salt, byte complexity = DEFAULT_COMPLEXITY, PasswordHashing.ALGORITHM algorithm = PasswordHashing.ALGORITHM.DEFAULT) { if (complexity > COMPLEXITY_MAX_VALUE) { throw new ArgumentException("Complexity exceeds maximum allowed value!"); } if (complexity < COMPLEXITY_MIN_VALUE) { throw new ArgumentException("Complexity exceeds minimum allowed value!"); } _hash = hash; _salt = salt; _complexity = complexity; _algorithm = algorithm; }
public HashedPassword(byte[] salt, byte complexity = DEFAULT_COMPLEXITY, PasswordHashing.ALGORITHM algorithm = PasswordHashing.ALGORITHM.DEFAULT) : this(new byte[DEFAULT_OUTPUT_SIZE], salt, complexity, algorithm) { }