FileDocCategorySizeDatePackage
KeyPair.javaAPI DocAndroid 1.5 API2157Wed May 06 22:41:06 BST 2009java.security

KeyPair

public final class KeyPair extends Object implements Serializable
{@code KeyPair} is a container for a public key and a private key. Since the private key can be accessed, instances must be treated like a private key.
see
PrivateKey
see
PublicKey
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private final PrivateKey
privateKey
private final PublicKey
publicKey
Constructors Summary
public KeyPair(PublicKey publicKey, PrivateKey privateKey)
Constructs a new instance of {@code KeyPair} with a public key and the corresponding private key.

param
publicKey the public key.
param
privateKey the private key.
since
Android 1.0


                                                             
         
        this.privateKey = privateKey;
        this.publicKey = publicKey;
    
Methods Summary
public java.security.PrivateKeygetPrivate()
Returns the private key.

return
the private key.
since
Android 1.0

        return privateKey;
    
public java.security.PublicKeygetPublic()
Returns the public key.

return
the public key.
since
Android 1.0

        return publicKey;