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

su.iroha.0.0.8.source-code.ModelCrypto Maven / Gradle / Ivy

Go to download

A application used as an example on how to set up pushing its components to the Central Repository.

The newest version!
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.12
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


public class ModelCrypto {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected ModelCrypto(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(ModelCrypto obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        irohaJNI.delete_ModelCrypto(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public Keypair generateKeypair() {
    return new Keypair(irohaJNI.ModelCrypto_generateKeypair(swigCPtr, this), true);
  }

  public Keypair fromPrivateKey(String private_key) {
    return new Keypair(irohaJNI.ModelCrypto_fromPrivateKey(swigCPtr, this, private_key), true);
  }

  public Keypair convertFromExisting(String public_key, String private_key) {
    return new Keypair(irohaJNI.ModelCrypto_convertFromExisting(swigCPtr, this, public_key, private_key), true);
  }

  public ModelCrypto() {
    this(irohaJNI.new_ModelCrypto(), true);
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy