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

package com.chilkatsoft;

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

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

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

  protected static long swigRelease(CkPfx obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

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

  public CkPfx() {
    this(chilkatJNI.new_CkPfx(), true);
  }

  public void LastErrorXml(CkString str) {
    chilkatJNI.CkPfx_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorHtml(CkString str) {
    chilkatJNI.CkPfx_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void LastErrorText(CkString str) {
    chilkatJNI.CkPfx_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public void get_AlgorithmId(CkString str) {
    chilkatJNI.CkPfx_get_AlgorithmId(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String algorithmId() {
    return chilkatJNI.CkPfx_algorithmId(swigCPtr, this);
  }

  public void put_AlgorithmId(String newVal) {
    chilkatJNI.CkPfx_put_AlgorithmId(swigCPtr, this, newVal);
  }

  public void get_DebugLogFilePath(CkString str) {
    chilkatJNI.CkPfx_get_DebugLogFilePath(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String debugLogFilePath() {
    return chilkatJNI.CkPfx_debugLogFilePath(swigCPtr, this);
  }

  public void put_DebugLogFilePath(String newVal) {
    chilkatJNI.CkPfx_put_DebugLogFilePath(swigCPtr, this, newVal);
  }

  public void get_LastErrorHtml(CkString str) {
    chilkatJNI.CkPfx_get_LastErrorHtml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorHtml() {
    return chilkatJNI.CkPfx_lastErrorHtml(swigCPtr, this);
  }

  public void get_LastErrorText(CkString str) {
    chilkatJNI.CkPfx_get_LastErrorText(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorText() {
    return chilkatJNI.CkPfx_lastErrorText(swigCPtr, this);
  }

  public void get_LastErrorXml(CkString str) {
    chilkatJNI.CkPfx_get_LastErrorXml(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String lastErrorXml() {
    return chilkatJNI.CkPfx_lastErrorXml(swigCPtr, this);
  }

  public boolean get_LastMethodSuccess() {
    return chilkatJNI.CkPfx_get_LastMethodSuccess(swigCPtr, this);
  }

  public void put_LastMethodSuccess(boolean newVal) {
    chilkatJNI.CkPfx_put_LastMethodSuccess(swigCPtr, this, newVal);
  }

  public int get_NumCerts() {
    return chilkatJNI.CkPfx_get_NumCerts(swigCPtr, this);
  }

  public int get_NumPrivateKeys() {
    return chilkatJNI.CkPfx_get_NumPrivateKeys(swigCPtr, this);
  }

  public void get_Pbes2CryptAlg(CkString str) {
    chilkatJNI.CkPfx_get_Pbes2CryptAlg(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String pbes2CryptAlg() {
    return chilkatJNI.CkPfx_pbes2CryptAlg(swigCPtr, this);
  }

  public void put_Pbes2CryptAlg(String newVal) {
    chilkatJNI.CkPfx_put_Pbes2CryptAlg(swigCPtr, this, newVal);
  }

  public void get_Pbes2HmacAlg(CkString str) {
    chilkatJNI.CkPfx_get_Pbes2HmacAlg(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String pbes2HmacAlg() {
    return chilkatJNI.CkPfx_pbes2HmacAlg(swigCPtr, this);
  }

  public void put_Pbes2HmacAlg(String newVal) {
    chilkatJNI.CkPfx_put_Pbes2HmacAlg(swigCPtr, this, newVal);
  }

  public void get_UncommonOptions(CkString str) {
    chilkatJNI.CkPfx_get_UncommonOptions(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String uncommonOptions() {
    return chilkatJNI.CkPfx_uncommonOptions(swigCPtr, this);
  }

  public void put_UncommonOptions(String newVal) {
    chilkatJNI.CkPfx_put_UncommonOptions(swigCPtr, this, newVal);
  }

  public boolean get_VerboseLogging() {
    return chilkatJNI.CkPfx_get_VerboseLogging(swigCPtr, this);
  }

  public void put_VerboseLogging(boolean newVal) {
    chilkatJNI.CkPfx_put_VerboseLogging(swigCPtr, this, newVal);
  }

  public void get_Version(CkString str) {
    chilkatJNI.CkPfx_get_Version(swigCPtr, this, CkString.getCPtr(str), str);
  }

  public String version() {
    return chilkatJNI.CkPfx_version(swigCPtr, this);
  }

  public boolean AddCert(CkCert cert, boolean includeChain) {
    return chilkatJNI.CkPfx_AddCert(swigCPtr, this, CkCert.getCPtr(cert), cert, includeChain);
  }

  public boolean AddPrivateKey(CkPrivateKey privKey, CkCertChain certChain) {
    return chilkatJNI.CkPfx_AddPrivateKey(swigCPtr, this, CkPrivateKey.getCPtr(privKey), privKey, CkCertChain.getCPtr(certChain), certChain);
  }

  public boolean CertAt(int index, CkCert cert) {
    return chilkatJNI.CkPfx_CertAt(swigCPtr, this, index, CkCert.getCPtr(cert), cert);
  }

  public boolean CertByLocalKeyId(String localKeyId, String encoding, CkCert cert) {
    return chilkatJNI.CkPfx_CertByLocalKeyId(swigCPtr, this, localKeyId, encoding, CkCert.getCPtr(cert), cert);
  }

  public CkCert FindCertByLocalKeyId(String localKeyId, String encoding) {
    long cPtr = chilkatJNI.CkPfx_FindCertByLocalKeyId(swigCPtr, this, localKeyId, encoding);
    return (cPtr == 0) ? null : new CkCert(cPtr, true);
  }

  public CkCert GetCert(int index) {
    long cPtr = chilkatJNI.CkPfx_GetCert(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CkCert(cPtr, true);
  }

  public void GetLastJsonData(CkJsonObject json) {
    chilkatJNI.CkPfx_GetLastJsonData(swigCPtr, this, CkJsonObject.getCPtr(json), json);
  }

  public CkPrivateKey GetPrivateKey(int index) {
    long cPtr = chilkatJNI.CkPfx_GetPrivateKey(swigCPtr, this, index);
    return (cPtr == 0) ? null : new CkPrivateKey(cPtr, true);
  }

  public boolean GetSafeBagAttr(boolean forPrivateKey, int index, String attrName, CkString outStr) {
    return chilkatJNI.CkPfx_GetSafeBagAttr(swigCPtr, this, forPrivateKey, index, attrName, CkString.getCPtr(outStr), outStr);
  }

  public String getSafeBagAttr(boolean forPrivateKey, int index, String attrName) {
    return chilkatJNI.CkPfx_getSafeBagAttr(swigCPtr, this, forPrivateKey, index, attrName);
  }

  public String safeBagAttr(boolean forPrivateKey, int index, String attrName) {
    return chilkatJNI.CkPfx_safeBagAttr(swigCPtr, this, forPrivateKey, index, attrName);
  }

  public boolean ImportToKeychain(CkJsonObject opts) {
    return chilkatJNI.CkPfx_ImportToKeychain(swigCPtr, this, CkJsonObject.getCPtr(opts), opts);
  }

  public boolean ImportToWindows(boolean exportable, boolean userProtected, boolean machineKeyset, boolean allowOverwriteKey, boolean allowExport, String leafStore, String intermediateStore, String rootStore, String extraOptions) {
    return chilkatJNI.CkPfx_ImportToWindows(swigCPtr, this, exportable, userProtected, machineKeyset, allowOverwriteKey, allowExport, leafStore, intermediateStore, rootStore, extraOptions);
  }

  public CkJsonObject LastJsonData() {
    long cPtr = chilkatJNI.CkPfx_LastJsonData(swigCPtr, this);
    return (cPtr == 0) ? null : new CkJsonObject(cPtr, true);
  }

  public boolean LoadPem(String pemStr, String password) {
    return chilkatJNI.CkPfx_LoadPem(swigCPtr, this, pemStr, password);
  }

  public boolean LoadPfxBd(CkBinData bd, String password) {
    return chilkatJNI.CkPfx_LoadPfxBd(swigCPtr, this, CkBinData.getCPtr(bd), bd, password);
  }

  public boolean LoadPfxBytes(CkByteData pfxData, String password) {
    return chilkatJNI.CkPfx_LoadPfxBytes(swigCPtr, this, CkByteData.getCPtr(pfxData), pfxData, password);
  }

  public boolean LoadPfxEncoded(String encodedData, String encoding, String password) {
    return chilkatJNI.CkPfx_LoadPfxEncoded(swigCPtr, this, encodedData, encoding, password);
  }

  public boolean LoadPfxFile(String path, String password) {
    return chilkatJNI.CkPfx_LoadPfxFile(swigCPtr, this, path, password);
  }

  public boolean PrivateKeyAt(int index, CkPrivateKey privKey) {
    return chilkatJNI.CkPfx_PrivateKeyAt(swigCPtr, this, index, CkPrivateKey.getCPtr(privKey), privKey);
  }

  public boolean SetSafeBagAttr(boolean forPrivateKey, int index, String name, String value, String encoding) {
    return chilkatJNI.CkPfx_SetSafeBagAttr(swigCPtr, this, forPrivateKey, index, name, value, encoding);
  }

  public boolean ToBd(String password, CkBinData bd) {
    return chilkatJNI.CkPfx_ToBd(swigCPtr, this, password, CkBinData.getCPtr(bd), bd);
  }

  public boolean ToBinary(String password, CkByteData outBytes) {
    return chilkatJNI.CkPfx_ToBinary(swigCPtr, this, password, CkByteData.getCPtr(outBytes), outBytes);
  }

  public boolean ToEncodedString(String password, String encoding, CkString outStr) {
    return chilkatJNI.CkPfx_ToEncodedString(swigCPtr, this, password, encoding, CkString.getCPtr(outStr), outStr);
  }

  public String toEncodedString(String password, String encoding) {
    return chilkatJNI.CkPfx_toEncodedString(swigCPtr, this, password, encoding);
  }

  public boolean ToFile(String password, String path) {
    return chilkatJNI.CkPfx_ToFile(swigCPtr, this, password, path);
  }

  public CkJavaKeyStore ToJavaKeyStore(String alias, String password) {
    long cPtr = chilkatJNI.CkPfx_ToJavaKeyStore(swigCPtr, this, alias, password);
    return (cPtr == 0) ? null : new CkJavaKeyStore(cPtr, true);
  }

  public boolean ToJksObj(String alias, String password, CkJavaKeyStore jksObj) {
    return chilkatJNI.CkPfx_ToJksObj(swigCPtr, this, alias, password, CkJavaKeyStore.getCPtr(jksObj), jksObj);
  }

  public boolean ToPem(CkString outStr) {
    return chilkatJNI.CkPfx_ToPem(swigCPtr, this, CkString.getCPtr(outStr), outStr);
  }

  public String toPem() {
    return chilkatJNI.CkPfx_toPem(swigCPtr, this);
  }

  public boolean ToPemEx(boolean extendedAttrs, boolean noKeys, boolean noCerts, boolean noCaCerts, String encryptAlg, String password, CkString outStr) {
    return chilkatJNI.CkPfx_ToPemEx(swigCPtr, this, extendedAttrs, noKeys, noCerts, noCaCerts, encryptAlg, password, CkString.getCPtr(outStr), outStr);
  }

  public String toPemEx(boolean extendedAttrs, boolean noKeys, boolean noCerts, boolean noCaCerts, String encryptAlg, String password) {
    return chilkatJNI.CkPfx_toPemEx(swigCPtr, this, extendedAttrs, noKeys, noCerts, noCaCerts, encryptAlg, password);
  }

  public boolean UseCertVault(CkXmlCertVault vault) {
    return chilkatJNI.CkPfx_UseCertVault(swigCPtr, this, CkXmlCertVault.getCPtr(vault), vault);
  }

}
