Top Description Fields Constructors Methods
org.bouncycastle.crypto.constraints

public Class LegacyBitsOfSecurityConstraint

extends ServicesConstraint
Class Inheritance
Imports
java.util.Collections, .Set, java.util.logging.Level, org.bouncycastle.crypto.CryptoServiceConstraintsException, .CryptoServiceProperties, .CryptoServicePurpose

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.

Field Summary

Modifier and TypeField and Description
private final int
private final int
Inherited from org.bouncycastle.crypto.constraints.ServicesConstraint:
LOG

Constructor Summary

AccessConstructor and Description
public
LegacyBitsOfSecurityConstraint(int
required bits of security for encryption and signing operations.
requiredBitsOfSecurity
)

Base constructor, legacy level is set to 0.

public
LegacyBitsOfSecurityConstraint(int
required bits of security for encryption and signing operations.
requiredBitsOfSecurity
,
int
acceptable bits of security for decryption and verification operations.
legacyRequiredBitsOfSecurity
)

Provide required bits of security and legacy requirements.

public
LegacyBitsOfSecurityConstraint(int
required bits of security for encryption and signing operations.
requiredBitsOfSecurity
,
Set<String>
set service names which are exceptions to the above rules.
exceptions
)

Provide required bits of security, and a set of exceptions.

public
LegacyBitsOfSecurityConstraint(int
required bits of security for encryption and signing operations.
requiredBitsOfSecurity
,
int
acceptable bits of security for decryption and verification operations.
legacyRequiredBitsOfSecurity
,
Set<String>
set service names which are exceptions to the above rules.
exceptions
)

Provide required bits of security, legacy requirements, and a set of exceptions.

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from org.bouncycastle.crypto.constraints.ServicesConstraint:
isException

Field Detail

legacyRequiredBitsOfSecurityback to summary
private final int legacyRequiredBitsOfSecurity
requiredBitsOfSecurityback to summary
private final int requiredBitsOfSecurity

Constructor Detail

LegacyBitsOfSecurityConstraintback to summary
public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity)

Base constructor, legacy level is set to 0.

Parameters
requiredBitsOfSecurity:int

required bits of security for encryption and signing operations.

LegacyBitsOfSecurityConstraintback to summary
public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity, int legacyRequiredBitsOfSecurity)

Provide required bits of security and legacy requirements.

Parameters
requiredBitsOfSecurity:int

required bits of security for encryption and signing operations.

legacyRequiredBitsOfSecurity:int

acceptable bits of security for decryption and verification operations.

LegacyBitsOfSecurityConstraintback to summary
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:int

required bits of security for encryption and signing operations.

exceptions:Set<String>

set service names which are exceptions to the above rules.

LegacyBitsOfSecurityConstraintback to summary
public LegacyBitsOfSecurityConstraint(int requiredBitsOfSecurity, int legacyRequiredBitsOfSecurity, Set<String> exceptions)

Provide required bits of security, legacy requirements, and a set of exceptions.

Parameters
requiredBitsOfSecurity:int

required bits of security for encryption and signing operations.

legacyRequiredBitsOfSecurity:int

acceptable bits of security for decryption and verification operations.

exceptions:Set<String>

set service names which are exceptions to the above rules.

Method Detail

checkback to summary
public void check(CryptoServiceProperties service)

Implements org.bouncycastle.crypto.CryptoServicesConstraints.check.