Class ConsistentKeyPair

java.lang.Object
org.bouncycastle.jcajce.ConsistentKeyPair

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

    • ConsistentKeyPair

      public ConsistentKeyPair(PublicKey publicKey, PrivateKey privateKey)
      Create a public/private key pair.
      Parameters:
      publicKey - the public key component.
      privateKey - the private key component.
      Throws:
      IllegalArgumentException - if the public and private key arguments are inconsistent.
  • Method Details

    • getPublic

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

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