public interface AlgorithmConstraints
AlgorithmConstraints对象是不可变的。 该接口的实现不应该提供可以在创建实例后更改实例的状态的方法。
请注意, AlgorithmConstraints可用于表示安全属性jdk.certpath.disabledAlgorithms和jdk.tls.disabledAlgorithms ,或可由具体的PKIXCertPathChecker用于检查认证路径中指定的证书是否包含所需的算法约束。
| Modifier and Type | Method and Description |
|---|---|
boolean |
permits(Set<CryptoPrimitive> primitives, Key key)
确定一个密钥是否被授予了指定的加密原语的权限。
|
boolean |
permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)
确定是否为算法授予了指定的加密原语的权限。
|
boolean |
permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)
确定算法和相应的密钥是否被授予对指定的加密原语的许可。
|
boolean permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)
primitives - 一组加密原语
algorithm - 算法名称
parameters - 算法参数,如果没有附加参数,则为null
IllegalArgumentException - 如果原语或算法为空或为空
boolean permits(Set<CryptoPrimitive> primitives, Key key)
此方法通常用于检查密钥大小和密钥使用情况。
primitives - 一组加密原语
key - 关键
IllegalArgumentException - 如果原语为空或为空,或键为空
boolean permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)
primitives - 一组加密原语
algorithm - 算法名称
key - 关键
parameters - 算法参数,如果没有其他参数,则为null
IllegalArgumentException - 如果原语或算法为空或空,或键为空
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.