public interface KeySpec
如果密钥存储在硬件设备上,它的规范可能包含有助于识别设备上的密钥的信息。
关键可能是在算法具体指定,或在一个独立于算法的编码格式(如ASN。1)。例如,一个DSA私钥可由其组成x
,p
,q
指定,并g
(见DSAPrivateKeySpec
),或者它可能使用其指定的(见PKCS8EncodedKeySpec
DER编码)。
此接口不包含任何方法或常量。它唯一的目的是组(并提供类型安全的)所有关键规格。所有关键规格必须实现此接口。
Key
,
KeyFactory
,
EncodedKeySpec
,
X509EncodedKeySpec
,
PKCS8EncodedKeySpec
,
DSAPrivateKeySpec
,
DSAPublicKeySpec
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.