org.n52.security.common.crypto
Interface KeyPair

All Known Implementing Classes:
DefaultKeyPair

public interface KeyPair

Class KeyPair encapsulates the concept of a private-public-keypair.

Version:
$Revision: $
Author:
Marko Reiprecht Created on 18.07.2008

Method Summary
 java.lang.String getAlias()
          Method gets the alias for the keypair.
 java.security.cert.Certificate getCertificate()
          Method gets the certificate if one exists.
 java.security.cert.Certificate[] getCertificateChain()
          Method gets the CertificateChain.
 java.security.Key getPrivateKey()
          Method gets the privateKey.
 java.security.PublicKey getPublicKey()
          Method gets the publicKey.
 boolean isCertificateChainSet()
          Returns if the pair bean contains a certificate chain.
 boolean isCertificateSet()
          Returns if the pair bean contains a certificate.
 boolean isPrivateKeySet()
          Returns if the pair bean contains a private key.
 boolean isPublicKeySet()
          Returns if the pair bean contains a public key.
 

Method Detail

getAlias

java.lang.String getAlias()
Method gets the alias for the keypair. Can be the empty string if unused.

Returns:
String.

getCertificate

java.security.cert.Certificate getCertificate()
Method gets the certificate if one exists.

Returns:
X509Certificate or null.

getCertificateChain

java.security.cert.Certificate[] getCertificateChain()
Method gets the CertificateChain.

Returns:
Certificate[].

getPrivateKey

java.security.Key getPrivateKey()
Method gets the privateKey. This can be a PrivateKey or a javax.crypto.SecretKey

Returns:
Key.

getPublicKey

java.security.PublicKey getPublicKey()
Method gets the publicKey.

if a X509Certificate exists than this method shall return getCertificate().getPublicKey();

Returns:
PublicKey.

isCertificateChainSet

boolean isCertificateChainSet()
Returns if the pair bean contains a certificate chain.

Returns:
boolean.

isCertificateSet

boolean isCertificateSet()
Returns if the pair bean contains a certificate.

Returns:
boolean.

isPrivateKeySet

boolean isPrivateKeySet()
Returns if the pair bean contains a private key.

Returns:
boolean.

isPublicKeySet

boolean isPublicKeySet()
Returns if the pair bean contains a public key.

Returns:
boolean.


Copyright © 2004-2009 52north.org. All Rights Reserved.