Package net.shibboleth.shared.security.impl

# Class SecureRandomIdentifierGenerationStrategy

java.lang.Object
net.shibboleth.shared.security.impl.RandomIdentifierGenerationStrategy
net.shibboleth.shared.security.impl.SecureRandomIdentifierGenerationStrategy

All Implemented Interfaces:
  `IdentifierGenerationStrategy`

@ThreadSafe public class SecureRandomIdentifierGenerationStrategy extends RandomIdentifierGenerationStrategy
A specialized subclass of `RandomIdentifierGenerationStrategy` which constrains the supplied random number generator to be an instance of `SecureRandom`.

## Nested Class Summary

## Nested classes/interfaces inherited from interface net.shibboleth.shared.security.IdentifierGenerationStrategy

`IdentifierGenerationStrategy.ParameterSpec, IdentifierGenerationStrategy.ProviderType`

## Constructor Summary

Constructors
Constructor
Description
`SecureRandomIdentifierGenerationStrategy()`
Default constructor.
`SecureRandomIdentifierGenerationStrategy(IdentifierGenerationStrategy.ParameterSpec params)`
Constructor.

## Method Summary

### Methods inherited from class net.shibboleth.shared.security.impl.RandomIdentifierGenerationStrategy

`generateIdentifier, generateIdentifier`

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

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

## Constructor Details

### SecureRandomIdentifierGenerationStrategy

public SecureRandomIdentifierGenerationStrategy()
Default 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(@Nonnull IdentifierGenerationStrategy.ParameterSpec params) throws InvalidAlgorithmParameterException
Constructor.

Parameters:
  `params` - parameter object, must be a `RandomIdentifierParameterSpec`
Throws:
  `InvalidAlgorithmParameterException` - if the parameters are invalid