Class SecureRandomFactoryBean


  • public class SecureRandomFactoryBean
    extends Object
    A factory bean for a JCA SecureRandom generator.

    This object holds the configurable properties of a secure random generator and uses them to create and load a SecureRandom instance.

    • Constructor Detail

      • SecureRandomFactoryBean

        public SecureRandomFactoryBean()
    • Method Detail

      • getAlgorithm

        public String getAlgorithm()
        Gets the secure random generator algorithm name.
        Returns:
        an algorithm name (e.g. SHA1PRNG); the SSL.DEFAULT_SECURE_RANDOM_ALGORITHM is returned if no algorithm has been specified
      • setAlgorithm

        public void setAlgorithm​(String algorithm)
        Sets the secure random generator algorithm name.
        Parameters:
        algorithm - an algorithm name, which must be recognized by the provider specified via setProvider(String) or by the platform's default provider if no provider is specified.
      • getProvider

        public String getProvider()
        Gets the JCA provider name for the secure random generator.
        Returns:
        provider name
      • setProvider

        public void setProvider​(String provider)
        Sets the JCA provider name for the secure random generator.
        Parameters:
        provider - name of the JCA provider to utilize in creating the secure random generator