namespace System.Security.Cryptography
{
///
/// An enumeration of the possible error codes which are returned from Daniel Dinu and
/// Dmitry Khovratovich's Argon2 library.
///
/// Some of these error conditions cannot be reached while using the C# PasswordHasher wrapper
///
public enum Argon2Error
{
///
/// The operation was successful
///
OK = 0,
///
/// The output hash length is less than 4 bytes
///
OUTPUT_TOO_SHORT = -2,
///
/// The salt is less than 8 bytes
///
SALT_TOO_SHORT = -6,
///
/// The salt is too big
///
SALT_TOO_LONG = -7,
///
/// The time cost is less than 1
///
TIME_TOO_SMALL = -12,
///
/// The memory cost is less than 8 (KiB)
///
MEMORY_TOO_LITTLE = -14,
///
/// The memory cost is greater than 2^21 (KiB) (2 GiB)
///
MEMORY_TOO_MUCH = -15,
///
/// The parallelism is less than 1
///
LANES_TOO_FEW = -16,
///
/// The parallelism is greater than 16,777,215
///
LANES_TOO_MANY = -17,
///
/// Memory allocation failed
///
MEMORY_ALLOCATION_ERROR = -22,
///
/// The parallelism is less than 1
///
THREADS_TOO_FEW = -28,
///
/// The parallelism is greater than 16,777,215
///
THREADS_TOO_MANY = -29,
///
/// This will not be returned from the C# PasswordHasher wrapper
///
DECODING_FAIL = -32,
///
/// Unable to create the number of threads requested
///
THREAD_FAIL = -33,
///
/// This will not be returned from the C# PasswordHasher wrapper
///
VERIFY_MISMATCH = -35
}
}