All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class iaik.security.rsa.KeyInfo

java.lang.Object
   |
   +----iaik.security.rsa.KeyInfo

public class KeyInfo
extends Object
This class looks for an implementation for a specific public key.


Constructor Index

 o KeyInfo()

Method Index

 o getFingerprint(PublicKey)
 o getPrivateKey(ASN1Object)
Returns an implementation for this private key, which can handle this PrivateKeyInfo ASN.1 type.
 o getPublicKey(ASN1Object)
Returns an implementation for this public key, which can handle this PublicKeyInfo ASN.1 type.

Constructors

 o KeyInfo
 public KeyInfo()

Methods

 o getPublicKey
 public static PublicKey getPublicKey(ASN1Object pki) throws InvalidKeyException, NoSuchAlgorithmException
Returns an implementation for this public key, which can handle this PublicKeyInfo ASN.1 type. I hope Sun defines an API to handle this in the same way as with Signature.

Parameters:
pki - the ASN.1 type PublicKeyInfo, which contains the public key
Throws: InvalidKeyException
if pki is no correct PublicKeyInfo ASN.1 type
Throws: NoSuchAlgorithmException
if the algorithm for this public key is not implemented
 o getPrivateKey
 public static PrivateKey getPrivateKey(ASN1Object pki) throws InvalidKeyException, NoSuchAlgorithmException
Returns an implementation for this private key, which can handle this PrivateKeyInfo ASN.1 type. I hope Sun defines an API to handle this in the same way as with signatures.

Parameters:
pki - the ASN.1 type PrivateKeyInfo, which contains the private key
Throws: InvalidKeyException
if pki is no correct PrivateKeyInfo ASN.1 type
Throws: NoSuchAlgorithmException
if the algorithm for this private key is not implemented
 o getFingerprint
 public static byte[] getFingerprint(PublicKey publicKey) throws InvalidKeyException

All Packages  Class Hierarchy  This Package  Previous  Next  Index