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

com.quorum.tessera.discovery.EnclaveKeySynchroniserFactory 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.discovery;

import com.quorum.tessera.enclave.Enclave;
import com.quorum.tessera.enclave.EnclaveFactory;

public class EnclaveKeySynchroniserFactory implements EnclaveKeySynchroniser {

    public static EnclaveKeySynchroniser provider() {
        Enclave enclave = EnclaveFactory.create().enclave().get();
        NetworkStore networkStore = NetworkStore.getInstance();
        return new EnclaveKeySynchroniserImpl(enclave, networkStore);
    }

    private final EnclaveKeySynchroniser synchroniser;

    public EnclaveKeySynchroniserFactory() {
        this(provider());
    }

    protected EnclaveKeySynchroniserFactory(EnclaveKeySynchroniser synchroniser) {
        this.synchroniser = synchroniser;
    }

    @Override
    public void syncKeys() {
        synchroniser.syncKeys();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy