Class SecureRandomIdentifierGenerationStrategy

java.lang.Object
net.shibboleth.utilities.java.support.security.impl.RandomIdentifierGenerationStrategy
net.shibboleth.utilities.java.support.security.impl.SecureRandomIdentifierGenerationStrategy
All Implemented Interfaces:
IdentifierGenerationStrategy

public class SecureRandomIdentifierGenerationStrategy
extends RandomIdentifierGenerationStrategy
A specialized subclass of RandomIdentifierGenerationStrategy which constrains the supplied random number generator to be an instance of SecureRandom.
  • Constructor Details

    • SecureRandomIdentifierGenerationStrategy

      public SecureRandomIdentifierGenerationStrategy()
      Constructor. Initializes the random number source to a new SecureRandom, size of identifier is set to 16 bytes, and the encoder is set to a Hex.
    • SecureRandomIdentifierGenerationStrategy

      public SecureRandomIdentifierGenerationStrategy​(@ParameterName(name="identifierSize") int identifierSize)
      Constructor. Initializes the random number source to a new SecureRandom and the encoder is set to a Hex.
      Parameters:
      identifierSize - number of random bytes in identifier
    • SecureRandomIdentifierGenerationStrategy

      public SecureRandomIdentifierGenerationStrategy​(@ParameterName(name="source") @Nonnull SecureRandom source, @ParameterName(name="identifierSize") int identifierSize, @ParameterName(name="identifierEncoder") @Nonnull org.apache.commons.codec.BinaryEncoder identifierEncoder)
      Constructor.
      Parameters:
      source - source of random bytes
      identifierSize - number of random bytes in the identifier
      identifierEncoder - encoder used to convert random bytes to string identifier