public class SecureRandomIdentifierGenerationStrategy extends RandomIdentifierGenerationStrategy
RandomIdentifierGenerationStrategy
which constrains the supplied
random number generator to be an instance of SecureRandom
.Constructor and Description |
---|
SecureRandomIdentifierGenerationStrategy()
Constructor.
|
SecureRandomIdentifierGenerationStrategy(int identifierSize)
Constructor.
|
SecureRandomIdentifierGenerationStrategy(SecureRandom source,
int identifierSize,
org.apache.commons.codec.BinaryEncoder identifierEncoder)
Constructor.
|
generateIdentifier, generateIdentifier
public SecureRandomIdentifierGenerationStrategy()
SecureRandom
, size of identifier is set to 16
bytes, and the encoder is set to a Hex
.public SecureRandomIdentifierGenerationStrategy(int identifierSize)
SecureRandom
and the encoder is set to a
Hex
.identifierSize
- number of random bytes in identifierpublic SecureRandomIdentifierGenerationStrategy(@Nonnull SecureRandom source, int identifierSize, @Nonnull org.apache.commons.codec.BinaryEncoder identifierEncoder)
source
- source of random bytesidentifierSize
- number of random bytes in the identifieridentifierEncoder
- encoder used to convert random bytes to string identifierCopyright © 2016 JBoss by Red Hat. All rights reserved.