Class MapVerifier

All Implemented Interfaces:
Verifier

public class MapVerifier extends LocalVerifier
Verifier that stores its local secrets in a map indexed by the identifier. Note that this verifier isn't very secure by itself.
Author:
Jerome Louvel
  • Constructor Details

    • MapVerifier

      public MapVerifier()
      Constructor.
    • MapVerifier

      public MapVerifier(ConcurrentMap<String,char[]> localSecrets)
      Constructor.
      Parameters:
      localSecrets - The map of local secrets.
  • Method Details

    • getLocalSecret

      public char[] getLocalSecret(String identifier)
      Description copied from class: LocalVerifier
      Returns the local secret associated to a given identifier.
      Specified by:
      getLocalSecret in class LocalVerifier
      Parameters:
      identifier - The identifier to lookup.
      Returns:
      The secret associated to the identifier or null.
    • getLocalSecrets

      public ConcurrentMap<String,char[]> getLocalSecrets()
      Returns the map of local secrets.
      Returns:
      The map of local secrets.
    • setLocalSecrets

      public void setLocalSecrets(Map<String,char[]> localSecrets)
      Sets the modifiable map of local secrets. This method clears the current map and puts all entries in the parameter map.
      Parameters:
      localSecrets - A map of local secrets.