All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quorum.tessera.encryption.KeyPair Maven / Gradle / Ivy

Go to download

Tessera is a stateless Java system that is used to enable the encryption, decryption, and distribution of private transactions for Quorum.

There is a newer version: 24.4.2
Show newest version
package com.quorum.tessera.encryption;

import java.util.Objects;

/**
 * Container object for a public/private key pair
 *
 * 

The public and private key should be related to each other, not just an arbitrary pairing of * two keys */ public class KeyPair { private final PublicKey publicKey; private final PrivateKey privateKey; public KeyPair(final PublicKey publicKey, final PrivateKey privateKey) { this.publicKey = Objects.requireNonNull(publicKey); this.privateKey = Objects.requireNonNull(privateKey); } public PublicKey getPublicKey() { return publicKey; } public PrivateKey getPrivateKey() { return privateKey; } @Override public boolean equals(final Object o) { return (o instanceof KeyPair) && Objects.equals(publicKey, ((KeyPair) o).publicKey) && Objects.equals(privateKey, ((KeyPair) o).privateKey); } @Override public int hashCode() { return Objects.hash(getPublicKey(), getPrivateKey()); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy