BitsOfSecurityConstraint (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.crypto.constraints

## Class BitsOfSecurityConstraint

- java.lang.Object
- - org.bouncycastle.crypto.constraints.ServicesConstraint
  - - org.bouncycastle.crypto.constraints.BitsOfSecurityConstraint

- All Implemented Interfaces:
    CryptoServicesConstraints

      public class BitsOfSecurityConstraint
      extends ServicesConstraint

  Basic bits of security constraint. Anything not of the required bits of security and not in the exception list will be rejected.

- - ### Field Summary

    - ### Fields inherited from class org.bouncycastle.crypto.constraints.ServicesConstraint

      `LOG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BitsOfSecurityConstraint(int requiredBitsOfSecurity)`
    `BitsOfSecurityConstraint(int requiredBitsOfSecurity, java.util.Set<java.lang.String> exceptions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `check(CryptoServiceProperties service)`

    - ### Methods inherited from class org.bouncycastle.crypto.constraints.ServicesConstraint

      `isException`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BitsOfSecurityConstraint

          public BitsOfSecurityConstraint(int requiredBitsOfSecurity)

    - #### BitsOfSecurityConstraint

          public BitsOfSecurityConstraint(int requiredBitsOfSecurity,
                                          java.util.Set<java.lang.String> exceptions)

  - ### Method Detail

    - #### check

          public void check(CryptoServiceProperties service)