Package java.security

Class KeyPair

    • Constructor Detail

      • KeyPair

        public KeyPair​(PublicKey publicKey,
                       PrivateKey privateKey)
        Constructs a new instance of KeyPair with a public key and the corresponding private key.
        Parameters:
        publicKey - the public key.
        privateKey - the private key.
    • Method Detail

      • getPrivate

        public PrivateKey getPrivate()
        Returns the private key.
        Returns:
        the private key.
      • getPublic

        public PublicKey getPublic()
        Returns the public key.
        Returns:
        the public key.