IPKIFCryptoRawOperations.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 IPKIFCryptoRawOperations extends IPKIFCryptoAlgSupport {
00012   private long swigCPtr;
00013 
00014   public IPKIFCryptoRawOperations(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.IPKIFCryptoRawOperations_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(IPKIFCryptoRawOperations 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_IPKIFCryptoRawOperations(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public void Sign(CPKIFKeyMaterial key, byte[] pHashData, int nHashDataLen, byte[] pSig, SWIGTYPE_p_int pnSigLen, HASH_ALG hashAlg) {
00039     pkif_moduleJNI.IPKIFCryptoRawOperations_Sign(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pHashData, nHashDataLen, pSig, SWIGTYPE_p_int.getCPtr(pnSigLen), hashAlg.swigValue());
00040   }
00041 
00042   public void Encrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean pad) {
00043     pkif_moduleJNI.IPKIFCryptoRawOperations_Encrypt__SWIG_0(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), pad);
00044   }
00045 
00046   public void Encrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00047     pkif_moduleJNI.IPKIFCryptoRawOperations_Encrypt__SWIG_1(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00048   }
00049 
00050   public void Decrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean pad) {
00051     pkif_moduleJNI.IPKIFCryptoRawOperations_Decrypt__SWIG_0(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), pad);
00052   }
00053 
00054   public void Decrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00055     pkif_moduleJNI.IPKIFCryptoRawOperations_Decrypt__SWIG_1(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00056   }
00057 
00058   public boolean Verify(CPKIFKeyMaterial key, byte[] pHashData, int nHashDataLen, byte[] pSig, int nSigLen, HASH_ALG hashAlg) {
00059     return pkif_moduleJNI.IPKIFCryptoRawOperations_Verify(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pHashData, nHashDataLen, pSig, nSigLen, hashAlg.swigValue());
00060   }
00061 
00062   public IPKIFRawCryptContext CryptInit(CPKIFKeyMaterial key, boolean pad) {
00063     long cPtr = pkif_moduleJNI.IPKIFCryptoRawOperations_CryptInit__SWIG_0(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pad);
00064     return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00065   }
00066 
00067   public IPKIFRawCryptContext CryptInit(CPKIFKeyMaterial key) {
00068     long cPtr = pkif_moduleJNI.IPKIFCryptoRawOperations_CryptInit__SWIG_1(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key);
00069     return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00070   }
00071 
00072   public void Decrypt(IPKIFRawCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00073     pkif_moduleJNI.IPKIFCryptoRawOperations_Decrypt__SWIG_2(swigCPtr, this, IPKIFRawCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00074   }
00075 
00076   public void Encrypt(IPKIFRawCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00077     pkif_moduleJNI.IPKIFCryptoRawOperations_Encrypt__SWIG_2(swigCPtr, this, IPKIFRawCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00078   }
00079 
00080   public IPKIFRawCryptContext HMACInit(CPKIFKeyMaterial key, HASH_ALG ha) {
00081     long cPtr = pkif_moduleJNI.IPKIFCryptoRawOperations_HMACInit(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, ha.swigValue());
00082     return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00083   }
00084 
00085   public void HMACUpdate(IPKIFRawCryptContext ctx, byte[] pData, int nDataLen) {
00086     pkif_moduleJNI.IPKIFCryptoRawOperations_HMACUpdate(swigCPtr, this, IPKIFRawCryptContext.getCPtr(ctx), ctx, pData, nDataLen);
00087   }
00088 
00089   public void HMACFinal(IPKIFRawCryptContext ctx, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00090     pkif_moduleJNI.IPKIFCryptoRawOperations_HMACFinal(swigCPtr, this, IPKIFRawCryptContext.getCPtr(ctx), ctx, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00091   }
00092 
00093   public boolean VerifyCertificate(CPKIFCertificate issCert, CPKIFCertificate subCert) {
00094     return pkif_moduleJNI.IPKIFCryptoRawOperations_VerifyCertificate(swigCPtr, this, CPKIFCertificate.getCPtr(issCert), issCert, CPKIFCertificate.getCPtr(subCert), subCert);
00095   }
00096 
00097 }

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