No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.
java.security

Interface AlgorithmConstraints


  • public interface AlgorithmConstraints
    This interface specifies constraints for cryptographic algorithms, keys (key sizes), and other algorithm parameters.

    AlgorithmConstraints objects are immutable. An implementation of this interface should not provide methods that can change the state of an instance once it has been created.

    Note that AlgorithmConstraints can be used to represent the restrictions described by the security properties jdk.certpath.disabledAlgorithms and jdk.tls.disabledAlgorithms, or could be used by a concrete PKIXCertPathChecker to check whether a specified certificate in the certification path contains the required algorithm constraints.

    Since:
    1.7
    See Also:
    SSLParameters.getAlgorithmConstraints(), SSLParameters.setAlgorithmConstraints(AlgorithmConstraints)
    • Method Detail

      • permits

        boolean permits(Set<CryptoPrimitive> primitives,
                      String algorithm,
                      AlgorithmParameters parameters)
        Determines whether an algorithm is granted permission for the specified cryptographic primitives.
        Parameters:
        primitives - a set of cryptographic primitives
        algorithm - the algorithm name
        parameters - the algorithm parameters, or null if no additional parameters
        Returns:
        true if the algorithm is permitted and can be used for all of the specified cryptographic primitives
        Throws:
        IllegalArgumentException - if primitives or algorithm is null or empty
      • permits

        boolean permits(Set<CryptoPrimitive> primitives,
                      Key key)
        Determines whether a key is granted permission for the specified cryptographic primitives.

        This method is usually used to check key size and key usage.

        Parameters:
        primitives - a set of cryptographic primitives
        key - the key
        Returns:
        true if the key can be used for all of the specified cryptographic primitives
        Throws:
        IllegalArgumentException - if primitives is null or empty, or the key is null
      • permits

        boolean permits(Set<CryptoPrimitive> primitives,
                      String algorithm,
                      Key key,
                      AlgorithmParameters parameters)
        Determines whether an algorithm and the corresponding key are granted permission for the specified cryptographic primitives.
        Parameters:
        primitives - a set of cryptographic primitives
        algorithm - the algorithm name
        key - the key
        parameters - the algorithm parameters, or null if no additional parameters
        Returns:
        true if the key and the algorithm can be used for all of the specified cryptographic primitives
        Throws:
        IllegalArgumentException - if primitives or algorithm is null or empty, or the key is null

Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-java/security/AlgorithmConstraints.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut