Enum Class PwHash.NeedsRehashResult

java.lang.Object
java.lang.Enum<PwHash.NeedsRehashResult>
com.goterl.lazysodium.interfaces.PwHash.NeedsRehashResult
All Implemented Interfaces:
Serializable, Comparable<PwHash.NeedsRehashResult>, Constable
Enclosing interface:
PwHash

public static enum PwHash.NeedsRehashResult extends Enum<PwHash.NeedsRehashResult>
Possible results of *NeedsRehash functions
  • Enum Constant Details

    • NO_REHASH_NEEDED

      public static final PwHash.NeedsRehashResult NO_REHASH_NEEDED
      The parameters already match, no rehash is needed.
    • NEEDS_REHASH

      public static final PwHash.NeedsRehashResult NEEDS_REHASH
      The string appears to be a valid hash but does not match the requested parameters; a new hash should be computed the next time the user logs in.
    • INVALID_HASH

      public static final PwHash.NeedsRehashResult INVALID_HASH
      The string does not appear to be a valid hash.
  • Method Details

    • values

      public static PwHash.NeedsRehashResult[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PwHash.NeedsRehashResult valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

      public static PwHash.NeedsRehashResult valueOf(int alg)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      alg - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null