Class LegacyBitsOfSecurityConstraint

java.lang.Object
org.bouncycastle.crypto.constraints.ServicesConstraint
org.bouncycastle.crypto.constraints.LegacyBitsOfSecurityConstraint
All Implemented Interfaces:
CryptoServicesConstraints

public class LegacyBitsOfSecurityConstraint extends ServicesConstraint
Legacy bits of security constraint. By default, legacy algorithms are all acceptable but can only be used for decryption and verification tasks. Algorithms with the required bits of security can be used for anything. If a minimum level of security is given for legacy algorithms, then anything below that will be treated as an error unless it appears in the exception list.
  • Constructor Details

    • LegacyBitsOfSecurityConstraint

      public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity)
      Base constructor, legacy level is set to 0.
      Parameters:
      requiredBitsOfSecurity - required bits of security for encryption and signing operations.
    • LegacyBitsOfSecurityConstraint

      public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity, int legacyRequiredBitsOfSecurity)
      Provide required bits of security and legacy requirements.
      Parameters:
      requiredBitsOfSecurity - required bits of security for encryption and signing operations.
      legacyRequiredBitsOfSecurity - acceptable bits of security for decryption and verification operations.
    • LegacyBitsOfSecurityConstraint

      public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity, Set<String> exceptions)
      Provide required bits of security, and a set of exceptions. Legacy requirement will default to 0.
      Parameters:
      requiredBitsOfSecurity - required bits of security for encryption and signing operations.
      exceptions - set service names which are exceptions to the above rules.
    • LegacyBitsOfSecurityConstraint

      public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity, int legacyRequiredBitsOfSecurity, Set<String> exceptions)
      Provide required bits of security, legacy requirements, and a set of exceptions.
      Parameters:
      requiredBitsOfSecurity - required bits of security for encryption and signing operations.
      legacyRequiredBitsOfSecurity - acceptable bits of security for decryption and verification operations.
      exceptions - set service names which are exceptions to the above rules.
  • Method Details