Class ConsistentKeyPair


  • public class ConsistentKeyPair
    extends java.lang.Object
    Carrier class for a key pair which validates the consistency of the keys at construction time.
    • Constructor Summary

      Constructors 
      Constructor Description
      ConsistentKeyPair​(java.security.PublicKey publicKey, java.security.PrivateKey privateKey)
      Create a public/private key pair.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.PrivateKey getPrivate()
      Return the private key component.
      java.security.PublicKey getPublic()
      Return the public key component.
      • Methods inherited from class java.lang.Object

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

      • ConsistentKeyPair

        public ConsistentKeyPair​(java.security.PublicKey publicKey,
                                 java.security.PrivateKey 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

      • getPublic

        public java.security.PublicKey getPublic()
        Return the public key component.
        Returns:
        the public key in the pair.
      • getPrivate

        public java.security.PrivateKey getPrivate()
        Return the private key component.
        Returns:
        the private key in the pair.