所有类


接口 java.security.PublicKey
的使用

使用 PublicKey 的软件包
java.security为安全框架提供类和接口。 
java.security.cert提供用于解析和管理证书、证书撤消列表 (CRL) 和证书路径的类和接口。 
java.security.interfaces提供的接口用于生成如 RSA Laboratory Technical Note PKCS#1 中所定义的 RSA(Rivest、Shamir 和 Adleman AsymmetricCipher 算法)密钥,以及如 NIST 的 FIPS-186 中所定义的 DSA(数字签名算法)密钥。 
javax.crypto.interfaces按在 RSA Laboratories' PKCS #3 中定义的那样提供 Diffie-Hellman 密钥接口。 
javax.security.cert为公钥证书类。 
 

java.securityPublicKey 的使用
 

返回 PublicKeyjava.security 中的方法
protected abstract  PublicKeyKeyFactorySpi.engineGeneratePublic(KeySpec keySpec)
          根据所提供的密钥规范(密钥材料)生成公钥对象。
 PublicKeyKeyFactory.generatePublic(KeySpec keySpec)
          根据所提供的密钥规范(密钥材料)生成公钥对象。
 PublicKeyKeyPair.getPublic()
          返回对此密钥对的公钥组件的引用。
 PublicKeyIdentity.getPublicKey()
          已过时。 返回此 Identity 的公钥。
 PublicKeyCertificate.getPublicKey()
          已过时。 返回保证人所保证的主体密钥对的密钥。
 

参数类型为 PublicKeyjava.security 中的方法
protected abstract  voidSignatureSpi.engineInitVerify(PublicKey publicKey)
          通过用于验证操作的指定公钥初始化此签名对象。
abstract  IdentityIdentityScope.getIdentity(PublicKey key)
          已过时。 检索具有指定公钥的身份。
 voidSignature.initVerify(PublicKey publicKey)
          初始化此用于验证的对象。
 voidIdentity.setPublicKey(PublicKey key)
          已过时。 设置此 Identity 的公钥。
 booleanSignedObject.verify(PublicKey verificationKey, Signature verificationEngine)
          使用指派的验证引擎,通过给定的验证密钥验证此 SignedObject 中的签名是否为内部存储对象的有效签名。
 

参数类型为 PublicKeyjava.security 中的构造方法
KeyPair(PublicKey publicKey, PrivateKey privateKey)
          根据给定的公钥和私钥构造密钥对。
 

java.security.certPublicKey 的使用
 

返回 PublicKeyjava.security.cert 中的方法
 PublicKeyTrustAnchor.getCAPublicKey()
          返回最受信任的 CA 的公钥。
abstract  PublicKeyCertificate.getPublicKey()
          从此证书中获得公钥。
 PublicKeyPKIXCertPathValidatorResult.getPublicKey()
          返回证书路径主体(目标)的公钥,如果适用,要包括所有继承的公钥参数。
 PublicKeyX509CertSelector.getSubjectPublicKey()
          返回 subjectPublicKey 标准。
 

参数类型为 PublicKeyjava.security.cert 中的方法
 voidX509CertSelector.setSubjectPublicKey(PublicKey key)
          设置 subjectPublicKey 标准。
abstract  voidCertificate.verify(PublicKey key)
          验证是否已使用与指定公钥相应的私钥签署了此证书。
abstract  voidX509CRL.verify(PublicKey key)
          验证是否已使用与给定公钥相应的私钥签署了此 CRL。
abstract  voidCertificate.verify(PublicKey key, String sigProvider)
          验证是否已使用与指定公钥相应的私钥签署了此证书。
abstract  voidX509CRL.verify(PublicKey key, String sigProvider)
          验证是否已使用与给定公钥相应的私钥签署了此 CRL。
 

参数类型为 PublicKeyjava.security.cert 中的构造方法
PKIXCertPathBuilderResult(CertPath certPath, TrustAnchor trustAnchor, PolicyNode policyTree, PublicKey subjectPublicKey)
          创建包含指定参数的 PKIXCertPathBuilderResult 实例。
PKIXCertPathValidatorResult(TrustAnchor trustAnchor, PolicyNode policyTree, PublicKey subjectPublicKey)
          创建包含指定参数的 PKIXCertPathValidatorResult 实例。
TrustAnchor(String caName, PublicKey pubKey, byte[] nameConstraints)
          创建一个 TrustAnchor 实例,其中以不同的名称和公钥的形式指定最受信任的 CA。
TrustAnchor(X500Principal caPrincipal, PublicKey pubKey, byte[] nameConstraints)
          创建一个 TrustAnchor 实例,其中以 X500Principal 和公钥的形式指定最受信任的 CA。
 

java.security.interfacesPublicKey 的使用
 

java.security.interfacesPublicKey 的子接口
 interfaceDSAPublicKey
          DSA 公用密钥的接口。
 interfaceECPublicKey
          椭圆曲线 (EC) 公用密钥的接口。
 interfaceRSAPublicKey
          RSA 公用密钥的接口。
 

javax.crypto.interfacesPublicKey 的使用
 

javax.crypto.interfacesPublicKey 的子接口
 interfaceDHPublicKey
          Diffie-Hellman 公钥接口。
 

javax.security.certPublicKey 的使用
 

返回 PublicKeyjavax.security.cert 中的方法
abstract  PublicKeyCertificate.getPublicKey()
          从此证书中获取公钥。
 

参数类型为 PublicKeyjavax.security.cert 中的方法
abstract  voidCertificate.verify(PublicKey key)
          验证是否已使用与指定公钥相对应的私钥签署了此证书。
abstract  voidCertificate.verify(PublicKey key, String sigProvider)
          验证是否已使用与指定公钥相对应的私钥签署了此证书。
 


所有类