org.n52.security.common.crypto
Interface KeyPair

All Known Implementing Classes:
DefaultKeyPair

public interface KeyPair

A private-public-keypair.

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

Method Summary
 String getAlias()
          Method gets the alias for the keypair.
 Certificate getCertificate()
          Method gets the certificate if one exists.
 Certificate[] getCertificateChain()
          Method gets the CertificateChain.
 Key getPrivateKey()
          Method gets the privateKey.
 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

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

Returns:
String.

getCertificate

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

Returns:
X509Certificate or null.

getCertificateChain

Certificate[] getCertificateChain()
Method gets the CertificateChain.

Returns:
Certificate[].

getPrivateKey

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

Returns:
Key.

getPublicKey

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–2014 52north.org. All rights reserved.