CPKIFCryptoPP.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 CPKIFCryptoPP extends IPKIFColleague {
00012   private long swigCPtr;
00013 
00014   public CPKIFCryptoPP(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.CPKIFCryptoPP_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(CPKIFCryptoPP 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_CPKIFCryptoPP(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public CPKIFCryptoPP() {
00039     this(pkif_moduleJNI.new_CPKIFCryptoPP(), true);
00040   }
00041 
00042   public void Initialize() {
00043     pkif_moduleJNI.CPKIFCryptoPP_Initialize(swigCPtr, this);
00044   }
00045 
00046   public void GetKeyList(CPKIFCredentialList v, SWIGTYPE_p_std__bitsetT_9_t arg1) {
00047     pkif_moduleJNI.CPKIFCryptoPP_GetKeyList__SWIG_0(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, SWIGTYPE_p_std__bitsetT_9_t.getCPtr(arg1));
00048   }
00049 
00050   public void GetKeyList(CPKIFCredentialList v) {
00051     pkif_moduleJNI.CPKIFCryptoPP_GetKeyList__SWIG_1(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v);
00052   }
00053 
00054   public void GetKeyList(CPKIFCredentialList v, CPKIFKeyUsagePtr ku) {
00055     pkif_moduleJNI.CPKIFCryptoPP_GetKeyList__SWIG_2(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, CPKIFKeyUsagePtr.getCPtr(ku), ku);
00056   }
00057 
00058   public boolean OwnsKey(CPKIFCredential keyID) {
00059     return pkif_moduleJNI.CPKIFCryptoPP_OwnsKey(swigCPtr, this, CPKIFCredential.getCPtr(keyID), keyID);
00060   }
00061 
00062   public CPKIFCredentialPtr MakeKeyID(String asciiHexKeyID) {
00063     return new CPKIFCredentialPtr(pkif_moduleJNI.CPKIFCryptoPP_MakeKeyID(swigCPtr, this, asciiHexKeyID), true);
00064   }
00065 
00066   public void Sign(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG ha) {
00067     pkif_moduleJNI.CPKIFCryptoPP_Sign(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), ha.swigValue());
00068   }
00069 
00070   public void Decrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00071     pkif_moduleJNI.CPKIFCryptoPP_Decrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00072   }
00073 
00074   public void Encrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00075     pkif_moduleJNI.CPKIFCryptoPP_Encrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00076   }
00077 
00078   public boolean Verify(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG ha) {
00079     return pkif_moduleJNI.CPKIFCryptoPP_Verify(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, ha.swigValue());
00080   }
00081 
00082   public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key, boolean pad) {
00083     long cPtr = pkif_moduleJNI.CPKIFCryptoPP_CryptInit__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pad);
00084     return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00085   }
00086 
00087   public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key) {
00088     long cPtr = pkif_moduleJNI.CPKIFCryptoPP_CryptInit__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key);
00089     return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00090   }
00091 
00092   public void Decrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00093     pkif_moduleJNI.CPKIFCryptoPP_Decrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00094   }
00095 
00096   public void Encrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00097     pkif_moduleJNI.CPKIFCryptoPP_Encrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00098   }
00099 
00100   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00101     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPP_SecretAgree__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00102   }
00103 
00104   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00105     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPP_SecretAgree__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00106   }
00107 
00108   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCredentialPtr ephemeralKeyPair, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00109     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPP_SecretAgree__SWIG_2(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCredentialPtr.getCPtr(ephemeralKeyPair), ephemeralKeyPair, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00110   }
00111 
00112   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCredentialPtr ephemeralKeyPair, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00113     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPP_SecretAgree__SWIG_3(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCredentialPtr.getCPtr(ephemeralKeyPair), ephemeralKeyPair, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00114   }
00115 
00116   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr ephemeralPublicKey, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00117     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPP_SecretAgree__SWIG_4(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(ephemeralPublicKey), ephemeralPublicKey, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00118   }
00119 
00120   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr ephemeralPublicKey, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00121     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPP_SecretAgree__SWIG_5(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(ephemeralPublicKey), ephemeralPublicKey, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00122   }
00123 
00124   public CPKIFKeyMaterialPtr DeriveKey(SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t context, long keyLen) {
00125     return new CPKIFKeyMaterialPtr(pkif_moduleJNI.CPKIFCryptoPP_DeriveKey(swigCPtr, this, SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t.getCPtr(context), keyLen), true);
00126   }
00127 
00128   public final static int thisComponent = pkif_moduleJNI.CPKIFCryptoPP_thisComponent_get();
00129 
00130 }

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