Class BouncyCastleSecureRandomHolder

java.lang.Object
com.itextpdf.bouncycastleconnector.BouncyCastleSecureRandomHolder

public class BouncyCastleSecureRandomHolder extends Object
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 Details

  • Method Details

    • getSecureRandom

      public SecureRandom getSecureRandom()
      Gets a secure random number generator instance.

      If bouncy-castle dependency is missing it will throw an exception.

      Returns:
      the lazily initialized SecureRandom