Class MaskedPasswordSpec

java.lang.Object
org.wildfly.security.password.spec.MaskedPasswordSpec
All Implemented Interfaces:
KeySpec, PasswordSpec

public final class MaskedPasswordSpec extends Object implements PasswordSpec
A password specification for a two-way password which is masked.
Author:
David M. Lloyd
  • Constructor Details

    • MaskedPasswordSpec

      public MaskedPasswordSpec(char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes)
      Construct a new instance.
      Parameters:
      initialKeyMaterial - the initial key material (must not be null)
      iterationCount - the iteration count
      salt - the salt bytes (must not be null)
      maskedPasswordBytes - the masked password bytes (must not be null)
    • MaskedPasswordSpec

      public MaskedPasswordSpec(char[] initialKeyMaterial, int iterationCount, byte[] salt, byte[] maskedPasswordBytes, byte[] initializationVector)
      Construct a new instance.
      Parameters:
      initialKeyMaterial - the initial key material (must not be null)
      iterationCount - the iteration count
      salt - the salt bytes (must not be null)
      maskedPasswordBytes - the masked password bytes (must not be null)
      initializationVector - the initialization vector (can be null)
  • Method Details

    • getInitialKeyMaterial

      public char[] getInitialKeyMaterial()
      Get the initial key material.
      Returns:
      the initial key material (must not be null)
    • getIterationCount

      public int getIterationCount()
      Get the iteration count.
      Returns:
      the iteration count
    • getSalt

      public byte[] getSalt()
      Get the salt bytes.
      Returns:
      the salt bytes (must not be null)
    • getMaskedPasswordBytes

      public byte[] getMaskedPasswordBytes()
      Get the masked password bytes.
      Returns:
      the masked password bytes (must not be null)
    • getInitializationVector

      public byte[] getInitializationVector()
      Get the initialization vector.
      Returns:
      the initialization vector (can be null)
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object