00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.orionsec.jpkif;
00010
00011 public class CPKIFCryptoPPPtr {
00012 private long swigCPtr;
00013 protected boolean swigCMemOwn;
00014
00015 public CPKIFCryptoPPPtr(long cPtr, boolean cMemoryOwn) {
00016 swigCMemOwn = cMemoryOwn;
00017 swigCPtr = cPtr;
00018 }
00019
00020 public static long getCPtr(CPKIFCryptoPPPtr 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_CPKIFCryptoPPPtr(swigCPtr);
00033 }
00034 swigCPtr = 0;
00035 }
00036 }
00037
00038 public void reset() {
00039 pkif_moduleJNI.CPKIFCryptoPPPtr_reset(swigCPtr, this);
00040 }
00041
00042 public CPKIFCryptoPP __deref__() {
00043 long cPtr = pkif_moduleJNI.CPKIFCryptoPPPtr___deref__(swigCPtr, this);
00044 return (cPtr == 0) ? null : new CPKIFCryptoPP(cPtr, false);
00045 }
00046
00047 public CPKIFCryptoPP get() {
00048 long cPtr = pkif_moduleJNI.CPKIFCryptoPPPtr_get(swigCPtr, this);
00049 return (cPtr == 0) ? null : new CPKIFCryptoPP(cPtr, false);
00050 }
00051
00052 public boolean unique() {
00053 return pkif_moduleJNI.CPKIFCryptoPPPtr_unique(swigCPtr, this);
00054 }
00055
00056 public int use_count() {
00057 return pkif_moduleJNI.CPKIFCryptoPPPtr_use_count(swigCPtr, this);
00058 }
00059
00060 public void swap(CPKIFCryptoPPPtr other) {
00061 pkif_moduleJNI.CPKIFCryptoPPPtr_swap(swigCPtr, this, CPKIFCryptoPPPtr.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.CPKIFCryptoPPPtr__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(CPKIFCryptoPPPtr r) {
00070 return pkif_moduleJNI.CPKIFCryptoPPPtr__internal_equiv(swigCPtr, this, CPKIFCryptoPPPtr.getCPtr(r), r);
00071 }
00072
00073 public void Initialize() {
00074 pkif_moduleJNI.CPKIFCryptoPPPtr_Initialize(swigCPtr, this);
00075 }
00076
00077 public void GetKeyList(CPKIFCredentialList v, SWIGTYPE_p_std__bitsetT_9_t arg1) {
00078 pkif_moduleJNI.CPKIFCryptoPPPtr_GetKeyList__SWIG_0(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, SWIGTYPE_p_std__bitsetT_9_t.getCPtr(arg1));
00079 }
00080
00081 public void GetKeyList(CPKIFCredentialList v) {
00082 pkif_moduleJNI.CPKIFCryptoPPPtr_GetKeyList__SWIG_1(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v);
00083 }
00084
00085 public void GetKeyList(CPKIFCredentialList v, CPKIFKeyUsagePtr ku) {
00086 pkif_moduleJNI.CPKIFCryptoPPPtr_GetKeyList__SWIG_2(swigCPtr, this, CPKIFCredentialList.getCPtr(v), v, CPKIFKeyUsagePtr.getCPtr(ku), ku);
00087 }
00088
00089 public boolean OwnsKey(CPKIFCredential keyID) {
00090 return pkif_moduleJNI.CPKIFCryptoPPPtr_OwnsKey(swigCPtr, this, CPKIFCredential.getCPtr(keyID), keyID);
00091 }
00092
00093 public CPKIFCredentialPtr MakeKeyID(String asciiHexKeyID) {
00094 return new CPKIFCredentialPtr(pkif_moduleJNI.CPKIFCryptoPPPtr_MakeKeyID(swigCPtr, this, asciiHexKeyID), true);
00095 }
00096
00097 public void Sign(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG ha) {
00098 pkif_moduleJNI.CPKIFCryptoPPPtr_Sign(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), ha.swigValue());
00099 }
00100
00101 public void Decrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00102 pkif_moduleJNI.CPKIFCryptoPPPtr_Decrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00103 }
00104
00105 public void Decrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00106 pkif_moduleJNI.CPKIFCryptoPPPtr_Decrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00107 }
00108
00109 public void Encrypt(CPKIFCredential key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00110 pkif_moduleJNI.CPKIFCryptoPPPtr_Encrypt__SWIG_0(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00111 }
00112
00113 public void Encrypt(IPKIFCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00114 pkif_moduleJNI.CPKIFCryptoPPPtr_Encrypt__SWIG_1(swigCPtr, this, IPKIFCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00115 }
00116
00117 public boolean Verify(CPKIFCredential key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG ha) {
00118 return pkif_moduleJNI.CPKIFCryptoPPPtr_Verify(swigCPtr, this, CPKIFCredential.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, ha.swigValue());
00119 }
00120
00121 public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key, boolean pad) {
00122 long cPtr = pkif_moduleJNI.CPKIFCryptoPPPtr_CryptInit__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key, pad);
00123 return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00124 }
00125
00126 public IPKIFCryptContext CryptInit(CPKIFCredentialPtr key) {
00127 long cPtr = pkif_moduleJNI.CPKIFCryptoPPPtr_CryptInit__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(key), key);
00128 return (cPtr == 0) ? null : new IPKIFCryptContext(cPtr, false);
00129 }
00130
00131 public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00132 return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPPPtr_SecretAgree__SWIG_0(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00133 }
00134
00135 public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00136 return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPPPtr_SecretAgree__SWIG_1(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00137 }
00138
00139 public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCredentialPtr ephemeralKeyPair, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00140 return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPPPtr_SecretAgree__SWIG_2(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCredentialPtr.getCPtr(ephemeralKeyPair), ephemeralKeyPair, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00141 }
00142
00143 public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFCredentialPtr ephemeralKeyPair, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00144 return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPPPtr_SecretAgree__SWIG_3(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFCredentialPtr.getCPtr(ephemeralKeyPair), ephemeralKeyPair, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00145 }
00146
00147 public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr ephemeralPublicKey, CPKIFCertificatePtr theirCert, CPKIFAlgorithm alg) {
00148 return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPPPtr_SecretAgree__SWIG_4(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(ephemeralPublicKey), ephemeralPublicKey, CPKIFCertificatePtr.getCPtr(theirCert), theirCert, CPKIFAlgorithm.getCPtr(alg), alg), true);
00149 }
00150
00151 public SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t SecretAgree(CPKIFCredentialPtr myPrivateKey, CPKIFBufferPtr ephemeralPublicKey, CPKIFBufferPtr theirPublicKey, CPKIFAlgorithm alg) {
00152 return new SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t(pkif_moduleJNI.CPKIFCryptoPPPtr_SecretAgree__SWIG_5(swigCPtr, this, CPKIFCredentialPtr.getCPtr(myPrivateKey), myPrivateKey, CPKIFBufferPtr.getCPtr(ephemeralPublicKey), ephemeralPublicKey, CPKIFBufferPtr.getCPtr(theirPublicKey), theirPublicKey, CPKIFAlgorithm.getCPtr(alg), alg), true);
00153 }
00154
00155 public CPKIFKeyMaterialPtr DeriveKey(SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t context, long keyLen) {
00156 return new CPKIFKeyMaterialPtr(pkif_moduleJNI.CPKIFCryptoPPPtr_DeriveKey(swigCPtr, this, SWIGTYPE_p_boost__shared_ptrT_IPKIFKeyAgreeContext_t.getCPtr(context), keyLen), true);
00157 }
00158
00159 public void AddParent(IPKIFColleague parent) {
00160 pkif_moduleJNI.CPKIFCryptoPPPtr_AddParent(swigCPtr, this, IPKIFColleague.getCPtr(parent), parent);
00161 }
00162
00163 public void RemoveParent(IPKIFColleague parent) {
00164 pkif_moduleJNI.CPKIFCryptoPPPtr_RemoveParent(swigCPtr, this, IPKIFColleague.getCPtr(parent), parent);
00165 }
00166
00167 public boolean IsParent(IPKIFColleague arg0) {
00168 return pkif_moduleJNI.CPKIFCryptoPPPtr_IsParent(swigCPtr, this, IPKIFColleague.getCPtr(arg0), arg0);
00169 }
00170
00171 public void InitializeMediator(SWIGTYPE_p_std__vectorT_CPKIFException_p_t errorInfo) {
00172 pkif_moduleJNI.CPKIFCryptoPPPtr_InitializeMediator__SWIG_0(swigCPtr, this, SWIGTYPE_p_std__vectorT_CPKIFException_p_t.getCPtr(errorInfo));
00173 }
00174
00175 public void InitializeMediator() {
00176 pkif_moduleJNI.CPKIFCryptoPPPtr_InitializeMediator__SWIG_1(swigCPtr, this);
00177 }
00178
00179 public void Terminate() {
00180 pkif_moduleJNI.CPKIFCryptoPPPtr_Terminate(swigCPtr, this);
00181 }
00182
00183 public void AddMediator(IPKIFColleaguePtr m) {
00184 pkif_moduleJNI.CPKIFCryptoPPPtr_AddMediator(swigCPtr, this, IPKIFColleaguePtr.getCPtr(m), m);
00185 }
00186
00187 public void RemoveMediator(IPKIFColleague arg0) {
00188 pkif_moduleJNI.CPKIFCryptoPPPtr_RemoveMediator(swigCPtr, this, IPKIFColleague.getCPtr(arg0), arg0);
00189 }
00190
00191 public void RemoveMediatorAssociations() {
00192 pkif_moduleJNI.CPKIFCryptoPPPtr_RemoveMediatorAssociations(swigCPtr, this);
00193 }
00194
00195 public void GetMediators(IPKIFColleagueList v) {
00196 pkif_moduleJNI.CPKIFCryptoPPPtr_GetMediators(swigCPtr, this, IPKIFColleagueList.getCPtr(v), v);
00197 }
00198
00199 }