CPKIFCryptoMediator2.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 CPKIFCryptoMediator2 extends IPKIFColleague {
00012   private long swigCPtr;
00013 
00014   public CPKIFCryptoMediator2(long cPtr, boolean cMemoryOwn) {
00015     super(pkif_moduleJNI.CPKIFCryptoMediator2_SWIGUpcast(cPtr), cMemoryOwn);
00016     swigCPtr = cPtr;
00017   }
00018 
00019   public static long getCPtr(CPKIFCryptoMediator2 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_CPKIFCryptoMediator2(swigCPtr);
00032       }
00033       swigCPtr = 0;
00034     }
00035     super.delete();
00036   }
00037 
00038   public CPKIFCryptoMediator2(boolean addDefaultColleagues) {
00039     this(pkif_moduleJNI.new_CPKIFCryptoMediator2__SWIG_0(addDefaultColleagues), true);
00040   }
00041 
00042   public CPKIFCryptoMediator2() {
00043     this(pkif_moduleJNI.new_CPKIFCryptoMediator2__SWIG_1(), true);
00044   }
00045 
00046   public void InitializeMediator(SWIGTYPE_p_std__vectorT_CPKIFException_p_t errorInfo) {
00047     pkif_moduleJNI.CPKIFCryptoMediator2_InitializeMediator(swigCPtr, this, SWIGTYPE_p_std__vectorT_CPKIFException_p_t.getCPtr(errorInfo));
00048   }
00049 
00050   public void Terminate() {
00051     pkif_moduleJNI.CPKIFCryptoMediator2_Terminate(swigCPtr, this);
00052   }
00053 
00054   public void Initialize() {
00055     pkif_moduleJNI.CPKIFCryptoMediator2_Initialize(swigCPtr, this);
00056   }
00057 
00058   public void GetColleagues(IPKIFColleagueList v) {
00059     pkif_moduleJNI.CPKIFCryptoMediator2_GetColleagues(swigCPtr, this, IPKIFColleagueList.getCPtr(v), v);
00060   }
00061 
00062   public void AddColleague(IPKIFColleaguePtr module) {
00063     pkif_moduleJNI.CPKIFCryptoMediator2_AddColleague(swigCPtr, this, IPKIFColleaguePtr.getCPtr(module), module);
00064   }
00065 
00066   public CPKIFCredentialPtr SetDefaultKey(String asciiHexKeyID, DefaultKeyType op) {
00067     return new CPKIFCredentialPtr(pkif_moduleJNI.CPKIFCryptoMediator2_SetDefaultKey(swigCPtr, this, asciiHexKeyID, op.swigValue()), true);
00068   }
00069 
00070   public CPKIFCredentialPtr GetDefaultKey(DefaultKeyType op) {
00071     return new CPKIFCredentialPtr(pkif_moduleJNI.CPKIFCryptoMediator2_GetDefaultKey(swigCPtr, this, op.swigValue()), true);
00072   }
00073 
00074   public void GenRandom(byte[] buf, int len) {
00075     pkif_moduleJNI.CPKIFCryptoMediator2_GenRandom(swigCPtr, this, buf, len);
00076   }
00077 
00078   public IPKIFHashContext HashInit(HASH_ALG alg) {
00079     long cPtr = pkif_moduleJNI.CPKIFCryptoMediator2_HashInit(swigCPtr, this, alg.swigValue());
00080     return (cPtr == 0) ? null : new IPKIFHashContext(cPtr, false);
00081   }
00082 
00083   public void HashUpdate(IPKIFHashContext hash, byte[] pData, int nDataLen) {
00084     pkif_moduleJNI.CPKIFCryptoMediator2_HashUpdate(swigCPtr, this, IPKIFHashContext.getCPtr(hash), hash, pData, nDataLen);
00085   }
00086 
00087   public void HashFinal(IPKIFHashContext hash, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00088     pkif_moduleJNI.CPKIFCryptoMediator2_HashFinal(swigCPtr, this, IPKIFHashContext.getCPtr(hash), hash, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00089   }
00090 
00091   public void Sign(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG hashAlg) {
00092     pkif_moduleJNI.CPKIFCryptoMediator2_Sign__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), hashAlg.swigValue());
00093   }
00094 
00095   public void Decrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00096     pkif_moduleJNI.CPKIFCryptoMediator2_Decrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00097   }
00098 
00099   public void Encrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00100     pkif_moduleJNI.CPKIFCryptoMediator2_Encrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00101   }
00102 
00103   public boolean Verify(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG hashAlg) {
00104     return pkif_moduleJNI.CPKIFCryptoMediator2_Verify__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, hashAlg.swigValue());
00105   }
00106 
00107   public void GetKeyList(CPKIFCredentialList v, SWIGTYPE_p_std__bitsetT_9_t ku) {
00108     pkif_moduleJNI.CPKIFCryptoMediator2_GetKeyList__SWIG_0(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, SWIGTYPE_p_std__bitsetT_9_t.getCPtr(ku));
00109   }
00110 
00111   public void GetKeyList(CPKIFCredentialList v) {
00112     pkif_moduleJNI.CPKIFCryptoMediator2_GetKeyList__SWIG_1(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v);
00113   }
00114 
00115   public void GetKeyList(CPKIFCredentialList v, CPKIFKeyUsagePtr ku) {
00116     pkif_moduleJNI.CPKIFCryptoMediator2_GetKeyList__SWIG_2(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, CPKIFKeyUsagePtr.getCPtr(ku), ku);
00117   }
00118 
00119   public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key, boolean pad) {
00120     long cPtr = pkif_moduleJNI.CPKIFCryptoMediator2_CryptInit__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pad);
00121     return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00122   }
00123 
00124   public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key) {
00125     long cPtr = pkif_moduleJNI.CPKIFCryptoMediator2_CryptInit__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key);
00126     return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00127   }
00128 
00129   public void Decrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00130     pkif_moduleJNI.CPKIFCryptoMediator2_Decrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00131   }
00132 
00133   public void Encrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00134     pkif_moduleJNI.CPKIFCryptoMediator2_Encrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00135   }
00136 
00137   public void Sign(CPKIFCredentialPtr key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG hashAlg) {
00138     pkif_moduleJNI.CPKIFCryptoMediator2_Sign__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), hashAlg.swigValue());
00139   }
00140 
00141   public void Decrypt(CPKIFCredentialPtr key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00142     pkif_moduleJNI.CPKIFCryptoMediator2_Decrypt__SWIG_2(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00143   }
00144 
00145   public void Encrypt(CPKIFCredentialPtr key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00146     pkif_moduleJNI.CPKIFCryptoMediator2_Encrypt__SWIG_2(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00147   }
00148 
00149   public boolean Verify(CPKIFCredentialPtr key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG hashAlg) {
00150     return pkif_moduleJNI.CPKIFCryptoMediator2_Verify__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, hashAlg.swigValue());
00151   }
00152 
00153   public void Sign(CPKIFKeyMaterial key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG hashAlg) {
00154     pkif_moduleJNI.CPKIFCryptoMediator2_Sign__SWIG_2(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), hashAlg.swigValue());
00155   }
00156 
00157   public void Encrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean pad) {
00158     pkif_moduleJNI.CPKIFCryptoMediator2_Encrypt__SWIG_3(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), pad);
00159   }
00160 
00161   public void Encrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00162     pkif_moduleJNI.CPKIFCryptoMediator2_Encrypt__SWIG_4(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00163   }
00164 
00165   public void Decrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean pad) {
00166     pkif_moduleJNI.CPKIFCryptoMediator2_Decrypt__SWIG_3(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), pad);
00167   }
00168 
00169   public void Decrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00170     pkif_moduleJNI.CPKIFCryptoMediator2_Decrypt__SWIG_4(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00171   }
00172 
00173   public boolean Verify(CPKIFKeyMaterial key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG hashAlg) {
00174     return pkif_moduleJNI.CPKIFCryptoMediator2_Verify__SWIG_2(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, hashAlg.swigValue());
00175   }
00176 
00177   public boolean VerifyCertificate(CPKIFCertificate issCert, CPKIFCertificate subCert) {
00178     return pkif_moduleJNI.CPKIFCryptoMediator2_VerifyCertificate(swigCPtr, this, CPKIFCertificate.getCPtr(issCert), issCert, CPKIFCertificate.getCPtr(subCert), subCert);
00179   }
00180 
00181   public IPKIFRawCryptContext CryptInit(CPKIFKeyMaterial key, boolean pad) {
00182     long cPtr = pkif_moduleJNI.CPKIFCryptoMediator2_CryptInit__SWIG_2(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pad);
00183     return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00184   }
00185 
00186   public IPKIFRawCryptContext CryptInit(CPKIFKeyMaterial key) {
00187     long cPtr = pkif_moduleJNI.CPKIFCryptoMediator2_CryptInit__SWIG_3(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key);
00188     return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00189   }
00190 
00191   public void Decrypt(IPKIFRawCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00192     pkif_moduleJNI.CPKIFCryptoMediator2_Decrypt__SWIG_5(swigCPtr, this, IPKIFRawCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00193   }
00194 
00195   public void Encrypt(IPKIFRawCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00196     pkif_moduleJNI.CPKIFCryptoMediator2_Encrypt__SWIG_5(swigCPtr, this, IPKIFRawCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00197   }
00198 
00199   public IPKIFRawCryptContext HMACInit(CPKIFKeyMaterial key, HASH_ALG ha) {
00200     long cPtr = pkif_moduleJNI.CPKIFCryptoMediator2_HMACInit(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, ha.swigValue());
00201     return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00202   }
00203 
00204   public void HMACUpdate(IPKIFRawCryptContext ctx, byte[] pData, int nDataLen) {
00205     pkif_moduleJNI.CPKIFCryptoMediator2_HMACUpdate(swigCPtr, this, IPKIFRawCryptContext.getCPtr(ctx), ctx, pData, nDataLen);
00206   }
00207 
00208   public void HMACFinal(IPKIFRawCryptContext ctx, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00209     pkif_moduleJNI.CPKIFCryptoMediator2_HMACFinal(swigCPtr, this, IPKIFRawCryptContext.getCPtr(ctx), ctx, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00210   }
00211 
00212   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00213     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoMediator2_SecretAgree__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00214   }
00215 
00216   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00217     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoMediator2_SecretAgree__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00218   }
00219 
00220   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCredentialPtr ephemeralKeyPair, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00221     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoMediator2_SecretAgree__SWIG_2(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCredentialPtr.getCPtr(ephemeralKeyPair), ephemeralKeyPair, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00222   }
00223 
00224   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCredentialPtr ephemeralKeyPair, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00225     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoMediator2_SecretAgree__SWIG_3(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCredentialPtr.getCPtr(ephemeralKeyPair), ephemeralKeyPair, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00226   }
00227 
00228   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr ephemeralPublicKey, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00229     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoMediator2_SecretAgree__SWIG_4(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(ephemeralPublicKey), ephemeralPublicKey, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00230   }
00231 
00232   public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr ephemeralPublicKey, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00233     return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoMediator2_SecretAgree__SWIG_5(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(ephemeralPublicKey), ephemeralPublicKey, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00234   }
00235 
00236   public CPKIFKeyMaterialPtr DeriveKey(SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t context, long keyLen) {
00237     return new CPKIFKeyMaterialPtr(pkif_moduleJNI.CPKIFCryptoMediator2_DeriveKey(swigCPtr, this, SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t.getCPtr(context), keyLen), true);
00238   }
00239 
00240   public boolean SupportsAlgorithm(CPKIFKeyMaterial key) {
00241     return pkif_moduleJNI.CPKIFCryptoMediator2_SupportsAlgorithm(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key);
00242   }
00243 
00244 }

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