Class SecureRandomIdentifierGenerationStrategy

    • Constructor Detail

      • 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