CPKIFNSS.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 CPKIFNSS extends IPKIFColleague {
00012   private long swigCPtr;
00013 
00014   public CPKIFNSS(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.CPKIFNSS_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(CPKIFNSS obj) {
00020     return (obj == null) ? 0 : obj.swigCPtr;
00021   }
00022 
00023   protected void finalize() {
00024     delete();
00025   }
00026 
00027   public synchronized void delete() {
00028     if (swigCPtr != 0) {
00029       if (swigCMemOwn) {
00030         swigCMemOwn = false;
00031         pkif_moduleJNI.delete_CPKIFNSS(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public CPKIFNSS(String dbdir) {
00039     this(pkif_moduleJNI.new_CPKIFNSS__SWIG_0(dbdir), true);
00040   }
00041 
00042   public CPKIFNSS() {
00043     this(pkif_moduleJNI.new_CPKIFNSS__SWIG_1(), true);
00044   }
00045 
00046   public void Initialize() {
00047     pkif_moduleJNI.CPKIFNSS_Initialize(swigCPtr, this);
00048   }
00049 
00050   public void GetKeyList(CPKIFCredentialList v, SWIGTYPE_p_std__bitsetT_9_t arg1) {
00051     pkif_moduleJNI.CPKIFNSS_GetKeyList__SWIG_0(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, SWIGTYPE_p_std__bitsetT_9_t.getCPtr(arg1));
00052   }
00053 
00054   public void GetKeyList(CPKIFCredentialList v) {
00055     pkif_moduleJNI.CPKIFNSS_GetKeyList__SWIG_1(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v);
00056   }
00057 
00058   public void GetKeyList(CPKIFCredentialList v, CPKIFKeyUsagePtr ku) {
00059     pkif_moduleJNI.CPKIFNSS_GetKeyList__SWIG_2(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, CPKIFKeyUsagePtr.getCPtr(ku), ku);
00060   }
00061 
00062   public boolean OwnsKey(CPKIFCredential keyID) {
00063     return pkif_moduleJNI.CPKIFNSS_OwnsKey(swigCPtr, this, CPKIFCredential.getCPtr(keyID), keyID);
00064   }
00065 
00066   public CPKIFCredentialPtr MakeKeyID(String asciiHexKeyID) {
00067     return new CPKIFCredentialPtr(pkif_moduleJNI.CPKIFNSS_MakeKeyID(swigCPtr, this, asciiHexKeyID), true);
00068   }
00069 
00070   public void Sign(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG hashAlg) {
00071     pkif_moduleJNI.CPKIFNSS_Sign(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), hashAlg.swigValue());
00072   }
00073 
00074   public void Decrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00075     pkif_moduleJNI.CPKIFNSS_Decrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00076   }
00077 
00078   public void Encrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00079     pkif_moduleJNI.CPKIFNSS_Encrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00080   }
00081 
00082   public boolean Verify(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG hashAlg) {
00083     return pkif_moduleJNI.CPKIFNSS_Verify(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, hashAlg.swigValue());
00084   }
00085 
00086   public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key, boolean pad) {
00087     long cPtr = pkif_moduleJNI.CPKIFNSS_CryptInit__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pad);
00088     return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00089   }
00090 
00091   public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key) {
00092     long cPtr = pkif_moduleJNI.CPKIFNSS_CryptInit__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key);
00093     return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00094   }
00095 
00096   public void Decrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00097     pkif_moduleJNI.CPKIFNSS_Decrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00098   }
00099 
00100   public void Encrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00101     pkif_moduleJNI.CPKIFNSS_Encrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00102   }
00103 
00104   public final static int thisComponent = pkif_moduleJNI.CPKIFNSS_thisComponent_get();
00105 
00106 }

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