Class SharedSecret

All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
KeySecret, PasswordSecret

public abstract class SharedSecret extends AbstractAuthenticationSecret
Authentication based on a shared secret.
  • Constructor Details

    • SharedSecret

      public SharedSecret()
  • Method Details

    • canSign

      public boolean canSign()
      Tests if the secret can be used for signing or, alternatively, verification only.
      Specified by:
      canSign in class AbstractAuthenticationSecret
      Returns:
      True, if the secret can be used for signing.
    • deriveKey

      public abstract byte[] deriveKey(int keysize, byte[] salt)
      Derives a key from the shared secret using a salt.
      Parameters:
      keysize - The target key size in bytes to generate.
      salt - Salt to use.
      Returns:
      Derived key.