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
-算法中的参数,如果没有额外的参数或空
IllegalArgumentException
如果原语或算法是null或空
boolean permits(Set<CryptoPrimitive> primitives, Key key)
此方法通常用于检查密钥大小和密钥使用情况。
primitives
-一套密码原语
key
的关键
IllegalArgumentException
如果原语是null或空,或关键是空的
boolean permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)
primitives
-一套密码原语
algorithm
的算法名称
key
的关键
parameters
-算法中的参数,如果没有额外的参数或空
IllegalArgumentException
如果原语或算法是null或空,或关键是空的
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.