CPKIFKeyMaterialPtr.java

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.1
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package com.orionsec.jpkif;
00010 
00011 public class CPKIFKeyMaterialPtr {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   public CPKIFKeyMaterialPtr(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   public static long getCPtr(CPKIFKeyMaterialPtr obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if (swigCPtr != 0) {
00030       if (swigCMemOwn) {
00031         swigCMemOwn = false;
00032         pkif_moduleJNI.delete_CPKIFKeyMaterialPtr(swigCPtr);
00033       }
00034       swigCPtr = 0;
00035     }
00036   }
00037 
00038   public void reset() {
00039     pkif_moduleJNI.CPKIFKeyMaterialPtr_reset(swigCPtr, this);
00040   }
00041 
00042   public CPKIFKeyMaterial __deref__() {
00043     long cPtr = pkif_moduleJNI.CPKIFKeyMaterialPtr___deref__(swigCPtr, this);
00044     return (cPtr == 0) ? null : new CPKIFKeyMaterial(cPtr, false);
00045   }
00046 
00047   public CPKIFKeyMaterial get() {
00048     long cPtr = pkif_moduleJNI.CPKIFKeyMaterialPtr_get(swigCPtr, this);
00049     return (cPtr == 0) ? null : new CPKIFKeyMaterial(cPtr, false);
00050   }
00051 
00052   public boolean unique() {
00053     return pkif_moduleJNI.CPKIFKeyMaterialPtr_unique(swigCPtr, this);
00054   }
00055 
00056   public int use_count() {
00057     return pkif_moduleJNI.CPKIFKeyMaterialPtr_use_count(swigCPtr, this);
00058   }
00059 
00060   public void swap(CPKIFKeyMaterialPtr other) {
00061     pkif_moduleJNI.CPKIFKeyMaterialPtr_swap(swigCPtr, this, CPKIFKeyMaterialPtr.getCPtr(other), other);
00062   }
00063 
00064   public SWIGTYPE_p_void _internal_get_deleter(SWIGTYPE_p_boost__detail__sp_typeinfo ti) {
00065     long cPtr = pkif_moduleJNI.CPKIFKeyMaterialPtr__internal_get_deleter(swigCPtr, this, SWIGTYPE_p_boost__detail__sp_typeinfo.getCPtr(ti));
00066     return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
00067   }
00068 
00069   public boolean _internal_equiv(CPKIFKeyMaterialPtr r) {
00070     return pkif_moduleJNI.CPKIFKeyMaterialPtr__internal_equiv(swigCPtr, this, CPKIFKeyMaterialPtr.getCPtr(r), r);
00071   }
00072 
00073   public boolean ContainsSymmetricKeyMaterial() {
00074     return pkif_moduleJNI.CPKIFKeyMaterialPtr_ContainsSymmetricKeyMaterial(swigCPtr, this);
00075   }
00076 
00077   public boolean ContainsCertificate() {
00078     return pkif_moduleJNI.CPKIFKeyMaterialPtr_ContainsCertificate(swigCPtr, this);
00079   }
00080 
00081   public boolean ContainsPublicKeyMaterial() {
00082     return pkif_moduleJNI.CPKIFKeyMaterialPtr_ContainsPublicKeyMaterial(swigCPtr, this);
00083   }
00084 
00085   public void SetSubjectPublicKeyInfo(CPKIFSubjectPublicKeyInfoPtr spki) {
00086     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetSubjectPublicKeyInfo(swigCPtr, this, CPKIFSubjectPublicKeyInfoPtr.getCPtr(spki), spki);
00087   }
00088 
00089   public CPKIFSubjectPublicKeyInfoPtr GetSubjectPublicKeyInfo() {
00090     return new CPKIFSubjectPublicKeyInfoPtr(pkif_moduleJNI.CPKIFKeyMaterialPtr_GetSubjectPublicKeyInfo(swigCPtr, this), true);
00091   }
00092 
00093   public void SetCertificate(byte[] cert, int certLen) {
00094     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetCertificate(swigCPtr, this, cert, certLen);
00095   }
00096 
00097   public void GetCertificate(byte[] cert, SWIGTYPE_p_int certLen) {
00098     pkif_moduleJNI.CPKIFKeyMaterialPtr_GetCertificate__SWIG_0(swigCPtr, this, cert, SWIGTYPE_p_int.getCPtr(certLen));
00099   }
00100 
00101   public byte[] GetCertificate() {
00102     byte[] ret = pkif_moduleJNI.CPKIFKeyMaterialPtr_GetCertificate__SWIG_1(swigCPtr, this);
00103     return ret;
00104   }
00105 
00106   public int GetCertificateLength() {
00107     return pkif_moduleJNI.CPKIFKeyMaterialPtr_GetCertificateLength(swigCPtr, this);
00108   }
00109 
00110   public void SetWorkingParameters(CPKIFAlgorithmIdentifierPtr algID) {
00111     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetWorkingParameters(swigCPtr, this, CPKIFAlgorithmIdentifierPtr.getCPtr(algID), algID);
00112   }
00113 
00114   public CPKIFAlgorithmIdentifierPtr GetWorkingParameters() {
00115     return new CPKIFAlgorithmIdentifierPtr(pkif_moduleJNI.CPKIFKeyMaterialPtr_GetWorkingParameters(swigCPtr, this), true);
00116   }
00117 
00118   public void SetIV(byte[] key, int keyLen) {
00119     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetIV(swigCPtr, this, key, keyLen);
00120   }
00121 
00122   public void GetIV(byte[] key, SWIGTYPE_p_int keyLen) {
00123     pkif_moduleJNI.CPKIFKeyMaterialPtr_GetIV__SWIG_0(swigCPtr, this, key, SWIGTYPE_p_int.getCPtr(keyLen));
00124   }
00125 
00126   public byte[] GetIV() {
00127     byte[] ret = pkif_moduleJNI.CPKIFKeyMaterialPtr_GetIV__SWIG_1(swigCPtr, this);
00128     return ret;
00129   }
00130 
00131   public void SetMode(SYMKEY_MODE mode) {
00132     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetMode(swigCPtr, this, mode.swigValue());
00133   }
00134 
00135   public SYMKEY_MODE GetMode() {
00136     return SYMKEY_MODE.swigToEnum(pkif_moduleJNI.CPKIFKeyMaterialPtr_GetMode(swigCPtr, this));
00137   }
00138 
00139   public void SetSymmetricKey(byte[] key, int keyLen) {
00140     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetSymmetricKey(swigCPtr, this, key, keyLen);
00141   }
00142 
00143   public void GetSymmetricKey(byte[] key, SWIGTYPE_p_int keyLen, SWIGTYPE_p_PKIFCRYPTO__SYMKEY_ALG alg) {
00144     pkif_moduleJNI.CPKIFKeyMaterialPtr_GetSymmetricKey__SWIG_0(swigCPtr, this, key, SWIGTYPE_p_int.getCPtr(keyLen), SWIGTYPE_p_PKIFCRYPTO__SYMKEY_ALG.getCPtr(alg));
00145   }
00146 
00147   public byte[] GetSymmetricKey() {
00148     byte[] ret = pkif_moduleJNI.CPKIFKeyMaterialPtr_GetSymmetricKey__SWIG_1(swigCPtr, this);
00149     return ret;
00150   }
00151 
00152   public int GetSymmetricKeyLength() {
00153     return pkif_moduleJNI.CPKIFKeyMaterialPtr_GetSymmetricKeyLength(swigCPtr, this);
00154   }
00155 
00156   public SYMKEY_ALG GetSymmetricKeyAlgorithm() {
00157     return SYMKEY_ALG.swigToEnum(pkif_moduleJNI.CPKIFKeyMaterialPtr_GetSymmetricKeyAlgorithm(swigCPtr, this));
00158   }
00159 
00160   public void SetSymmetricKeyAlgorithm(SYMKEY_ALG alg) {
00161     pkif_moduleJNI.CPKIFKeyMaterialPtr_SetSymmetricKeyAlgorithm(swigCPtr, this, alg.swigValue());
00162   }
00163 
00164   public CPKIFKeyMaterialPtr CreateWithSymmetricKey(CPKIFKeyMaterialPtr km) {
00165     return new CPKIFKeyMaterialPtr(pkif_moduleJNI.CPKIFKeyMaterialPtr_CreateWithSymmetricKey(swigCPtr, this, CPKIFKeyMaterialPtr.getCPtr(km), km), true);
00166   }
00167 
00168 }

Generated on Mon Nov 15 11:15:48 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6