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 Summary

      Methods 
      Modifier and Type Method and Description
      boolean permits(Set<CryptoPrimitive> primitives, Key key)
      Determines whether a key is granted permission for the specified cryptographic primitives.
      boolean permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)
      Determines whether an algorithm is granted permission for the specified cryptographic primitives.
      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.

        

    • 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

Traduction non disponible

Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.

Document créé le 11/06/2005, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-java/security/AlgorithmConstraints.html

L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.

Références

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com

Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.

Table des matières Haut