Package net.shibboleth.shared.security.impl

# Class Type4UUIDIdentifierGenerationStrategy

java.lang.Object
net.shibboleth.shared.security.impl.Type4UUIDIdentifierGenerationStrategy

All Implemented Interfaces:
  `IdentifierGenerationStrategy`

@ThreadSafe public class Type4UUIDIdentifierGenerationStrategy extends Object implements IdentifierGenerationStrategy
Generates a type 4 UUID as an identifier.

## Nested Class Summary

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

`IdentifierGenerationStrategy.ParameterSpec, IdentifierGenerationStrategy.ProviderType`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`String`
`generateIdentifier()`
Generates an identifier guaranteed to be XML ID safe.
`String`
`generateIdentifier(boolean xmlSafe)`
Generates an identifier.

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

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

## Constructor Details

### Type4UUIDIdentifierGenerationStrategy

public Type4UUIDIdentifierGenerationStrategy()
Default constructor.

### Type4UUIDIdentifierGenerationStrategy

public Type4UUIDIdentifierGenerationStrategy(@Nonnull IdentifierGenerationStrategy.ParameterSpec params) throws InvalidAlgorithmParameterException
Constructor.

It is invalid to supply any parameters to this method.

Parameters:
  `params` - must be null
Throws:
  `InvalidAlgorithmParameterException` - if the parameters are non-null

## Method Details

### generateIdentifier

@Nonnull @NotEmpty public String generateIdentifier()
Generates an identifier guaranteed to be XML ID safe.

Specified by:
  `generateIdentifier` in interface `IdentifierGenerationStrategy`
Returns:
  the identifier

### generateIdentifier

@Nonnull @NotEmpty public String generateIdentifier(boolean xmlSafe)
Generates an identifier.

Specified by:
  `generateIdentifier` in interface `IdentifierGenerationStrategy`
Parameters:
  `xmlSafe` - true iff the result must be XML ID safe
Returns:
  the identifier