Class PrivateKey


  • public class PrivateKey
    extends AbstractKey
    PrivateKey is an X25519 private key wrapper (64 bytes).
    • Constructor Detail

      • PrivateKey

        public PrivateKey​(byte[] key)
        PrivateKey constructor with byte[].
      • PrivateKey

        public PrivateKey​(String privateKeyBase64)
        PrivateKey constructor with base64 String.
    • Method Detail

      • seal

        public Hashtable<String,​byte[]> seal​(byte[] message,
                                                   PublicKey recipientPublicKey)
        encrypts a plain text message decipherable afterwards by the recipient private key.
      • open

        public byte[] open​(byte[] encryptedMessage,
                           PublicKey senderPublicKey,
                           byte[] nonce)
        decrypts an encrypted message with the appropriate sender information.
      • getPublicKey

        public PublicKey getPublicKey()