Package tigase.auth.credentials.entries

# Class ScramCredentialsEntry

java.lang.Object
tigase.auth.credentials.entries.ScramCredentialsEntry

All Implemented Interfaces:
  `Credentials.Entry`

Direct Known Subclasses:
  `ScramSha1CredentialsEntry`, `ScramSha256CredentialsEntry`, `ScramSha512CredentialsEntry`

public class ScramCredentialsEntry extends Object implements Credentials.Entry

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ScramCredentialsEntry.Decoder`
  `static class`
  `ScramCredentialsEntry.Encoder`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ScramCredentialsEntry(String algorithm, byte[] salt, int iterations, byte[] saltedPassword)`
  `ScramCredentialsEntry(String algorithm, byte[] salt, int iterations, byte[] storedKey, byte[] serverKey)`
  `ScramCredentialsEntry(String algorithm, PlainCredentialsEntry entry)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getIterations()`
  `String`
  `getMechanism()`
  Name of the encryption mechanism used to encode stored credentials.
  `byte[]`
  `getSalt()`
  `byte[]`
  `getServerKey()`
  `byte[]`
  `getStoredKey()`
  `boolean`
  `verifyPlainPassword(String password)`
  Check if plaintext password will match stored credential

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ScramCredentialsEntry

    public ScramCredentialsEntry(String algorithm, PlainCredentialsEntry entry) throws NoSuchAlgorithmException, InvalidKeyException
    Throws:
      `NoSuchAlgorithmException`
      `InvalidKeyException`

  - ### ScramCredentialsEntry

    public ScramCredentialsEntry(String algorithm, byte[] salt, int iterations, byte[] saltedPassword) throws NoSuchAlgorithmException, InvalidKeyException
    Throws:
      `NoSuchAlgorithmException`
      `InvalidKeyException`

  - ### ScramCredentialsEntry

    public ScramCredentialsEntry(String algorithm, byte[] salt, int iterations, byte[] storedKey, byte[] serverKey)

- ## Method Details

  - ### getIterations

    public int getIterations()

  - ### getMechanism

    public String getMechanism()
    Description copied from interface: `Credentials.Entry`
    Name of the encryption mechanism used to encode stored credentials. Note: Value returned by this method may be equal to SASL mechanism name used to encode this value, but doesn't have to be only one of SASL mechanism name, ie. for passwords encoded for PLAIN mechanism not stored in plain format in the repository.
    Specified by:
      `getMechanism` in interface `Credentials.Entry`

  - ### getSalt

    public byte[] getSalt()

  - ### getServerKey

    public byte[] getServerKey()

  - ### getStoredKey

    public byte[] getStoredKey()

  - ### verifyPlainPassword

    public boolean verifyPlainPassword(String password)
    Description copied from interface: `Credentials.Entry`
    Check if plaintext password will match stored credential
    Specified by:
      `verifyPlainPassword` in interface `Credentials.Entry`