JCA - 核心类和接口
本节介绍JCA提供的核心类和接口:
Provider
andSecurity
classes,SecureRandom
,MessageDigest
,Signature
,Cipher
,Mac
,KeyFactory
,SecretKeyFactory
,KeyPairGenerator
,KeyGenerator
,KeyAgreement
,AlgorithmParameters
,AlgorithmParameterGenerator
,KeyStore
, andCertificateFactory
等引擎类,Key
接口和类,Algorithm Parameter Specification 接口和类
和Key Specification 接口和类
, 以及- 其他的支持和工具类。
注:有关CertPathBuilder
,CertPathValidator
和CertStore
引擎类的更多信息,请参阅Java PKI Programmer’s Guide
。
本指南将首先介绍最常用的高级类(Provider,Security,SecureRandom,MessageDigest,Signature,Cipher和Mac),然后研究各种支持类。现在,简单地说,密钥(公钥,私钥和加密)由各种JCA类生成和表示,并被高级类用作其操作的一部分。
本部分显示每个类和接口中主要方法的特征。其中一些类(MessageDigest,Signature,KeyPairGenerator,SecureRandom,KeyFactory和密钥规范类)的示例在相应的示例部分提供。
相关安全API包的完整参考文档可以在软件包摘要中找到:
java.security
javax.crypto
java.security.cert
java.security.spec
javax.crypto.spec
java.security.interfaces
javax.crypto.interfaces
Provider类
Security类
SecureRandom类
更新MessageDigest
Signature类
Cipher类
基于Cipher的类
Mac类
Key接口
KeyPair类
密钥规范接口和类
生成器和工厂类
KeyFactory类
SecretKeyFactory类
KeyPairGenerator类
KeyGenerator类
KeyAgreement类
Key Management
算法参数类
CertificateFactory类