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

com.jd.blockchain.transaction.UserCAUpdateOpTemplate Maven / Gradle / Ivy

There is a newer version: 1.6.5.RELEASE
Show newest version
package com.jd.blockchain.transaction;

import com.jd.binaryproto.DataContractRegistry;
import com.jd.blockchain.ca.CertificateUtils;
import com.jd.blockchain.ledger.UserCAUpdateOperation;
import utils.Bytes;

import java.security.cert.X509Certificate;

public class UserCAUpdateOpTemplate implements UserCAUpdateOperation {

    static {
        DataContractRegistry.register(UserCAUpdateOperation.class);
    }

    private Bytes address;
    private String cert;

    public UserCAUpdateOpTemplate(Bytes address, X509Certificate cert) {
        this.address = address;
        this.cert = CertificateUtils.toPEMString(cert);
    }

    public UserCAUpdateOpTemplate(Bytes address, String cert) {
        this.address = address;
        this.cert = cert;
    }

    @Override
    public Bytes getUserAddress() {
        return address;
    }

    @Override
    public String getCertificate() {
        return cert;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy