Class BouncyCastleSecureRandomHolder
java.lang.Object
com.itextpdf.bouncycastleconnector.BouncyCastleSecureRandomHolder
A utility class for exception-free initialization of bouncy-castle-dependent secure random number generator. It is meant to be used specifically for instances initialized as a static field value, because exceptions thrown during class initialization causes troubles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a secure random number generator instance.
-
Constructor Details
-
BouncyCastleSecureRandomHolder
public BouncyCastleSecureRandomHolder()Creates a newBouncyCastleSecureRandomHolderinstance.
-
-
Method Details
-
getSecureRandom
Gets a secure random number generator instance.If bouncy-castle dependency is missing it will throw an exception.
- Returns:
-
the lazily initialized
SecureRandom
-