Class AsymmetricKeyPair<P extends AsymmetricPublicKey,​S extends AsymmetricPrivateKey>


  • public final class AsymmetricKeyPair<P extends AsymmetricPublicKey,​S extends AsymmetricPrivateKey>
    extends java.lang.Object
    Carrier class for a public key and its associated private key. This class will check the key pair on construction.
    • Constructor Summary

      Constructors 
      Constructor Description
      AsymmetricKeyPair​(P publicKey, S privateKey)
      Create a public/private key pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      S getPrivateKey()
      Return the private key of the pair.
      P getPublicKey()
      Return the public key of the pair.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsymmetricKeyPair

        public AsymmetricKeyPair​(P publicKey,
                                 S privateKey)
        Create a public/private key pair.
        Parameters:
        publicKey - the public key component.
        privateKey - the private key component.
        Throws:
        java.lang.IllegalArgumentException - if the public and private key arguments are inconsistent.
    • Method Detail

      • getPublicKey

        public P getPublicKey()
        Return the public key of the pair.
        Returns:
        the public key.
      • getPrivateKey

        public S getPrivateKey()
        Return the private key of the pair.
        Returns:
        the private key.