00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.orionsec.jpkif;
00010
00011 public class CPKIFCryptoPPRaw extends IPKIFColleague {
00012 private long swigCPtr;
00013
00014 public CPKIFCryptoPPRaw(long cPtr, boolean cMemoryOwn) {
00015 super(pkif_moduleJNI.CPKIFCryptoPPRaw_SWIGUpcast(cPtr), cMemoryOwn);
00016 swigCPtr = cPtr;
00017 }
00018
00019 public static long getCPtr(CPKIFCryptoPPRaw 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_CPKIFCryptoPPRaw(swigCPtr);
00032 }
00033 swigCPtr = 0;
00034 }
00035 super.delete();
00036 }
00037
00038 public CPKIFCryptoPPRaw() {
00039 this(pkif_moduleJNI.new_CPKIFCryptoPPRaw(), true);
00040 }
00041
00042 public void Initialize() {
00043 pkif_moduleJNI.CPKIFCryptoPPRaw_Initialize(swigCPtr, this);
00044 }
00045
00046 public void GenRandom(byte[] buf, int len) {
00047 pkif_moduleJNI.CPKIFCryptoPPRaw_GenRandom(swigCPtr, this, buf, len);
00048 }
00049
00050 public IPKIFHashContext HashInit(HASH_ALG alg) {
00051 long cPtr = pkif_moduleJNI.CPKIFCryptoPPRaw_HashInit(swigCPtr, this, alg.swigValue());
00052 return (cPtr == 0) ? null : new IPKIFHashContext(cPtr, false);
00053 }
00054
00055 public void HashUpdate(IPKIFHashContext hash, byte[] pData, int nDataLen) {
00056 pkif_moduleJNI.CPKIFCryptoPPRaw_HashUpdate(swigCPtr, this, IPKIFHashContext.getCPtr(hash), hash, pData, nDataLen);
00057 }
00058
00059 public void HashFinal(IPKIFHashContext hash, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00060 pkif_moduleJNI.CPKIFCryptoPPRaw_HashFinal(swigCPtr, this, IPKIFHashContext.getCPtr(hash), hash, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00061 }
00062
00063 public boolean SupportsAlgorithm(CPKIFKeyMaterial key) {
00064 return pkif_moduleJNI.CPKIFCryptoPPRaw_SupportsAlgorithm(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key);
00065 }
00066
00067 public void Sign(CPKIFKeyMaterial key, byte[] pHashData, int nHashDataLen, byte[] pSignature, SWIGTYPE_p_int nSignatureLen, HASH_ALG hashAlg) {
00068 pkif_moduleJNI.CPKIFCryptoPPRaw_Sign(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pHashData, nHashDataLen, pSignature, SWIGTYPE_p_int.getCPtr(nSignatureLen), hashAlg.swigValue());
00069 }
00070
00071 public void Decrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean pad) {
00072 pkif_moduleJNI.CPKIFCryptoPPRaw_Decrypt__SWIG_0(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), pad);
00073 }
00074
00075 public void Decrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00076 pkif_moduleJNI.CPKIFCryptoPPRaw_Decrypt__SWIG_1(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00077 }
00078
00079 public void Encrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean pad) {
00080 pkif_moduleJNI.CPKIFCryptoPPRaw_Encrypt__SWIG_0(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), pad);
00081 }
00082
00083 public void Encrypt(CPKIFKeyMaterial key, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00084 pkif_moduleJNI.CPKIFCryptoPPRaw_Encrypt__SWIG_1(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00085 }
00086
00087 public boolean Verify(CPKIFKeyMaterial key, byte[] pHashData, int nHashDataLen, byte[] pSignature, int nSignatureLen, HASH_ALG hashAlg) {
00088 return pkif_moduleJNI.CPKIFCryptoPPRaw_Verify(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pHashData, nHashDataLen, pSignature, nSignatureLen, hashAlg.swigValue());
00089 }
00090
00091 public boolean VerifyCertificate(CPKIFCertificate issCert, CPKIFCertificate subCert) {
00092 return pkif_moduleJNI.CPKIFCryptoPPRaw_VerifyCertificate(swigCPtr, this, CPKIFCertificate.getCPtr(issCert), issCert, CPKIFCertificate.getCPtr(subCert), subCert);
00093 }
00094
00095 public IPKIFRawCryptContext CryptInit(CPKIFKeyMaterial key, boolean pad) {
00096 long cPtr = pkif_moduleJNI.CPKIFCryptoPPRaw_CryptInit__SWIG_0(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, pad);
00097 return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00098 }
00099
00100 public IPKIFRawCryptContext CryptInit(CPKIFKeyMaterial key) {
00101 long cPtr = pkif_moduleJNI.CPKIFCryptoPPRaw_CryptInit__SWIG_1(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key);
00102 return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00103 }
00104
00105 public void Decrypt(IPKIFRawCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00106 pkif_moduleJNI.CPKIFCryptoPPRaw_Decrypt__SWIG_2(swigCPtr, this, IPKIFRawCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00107 }
00108
00109 public void Encrypt(IPKIFRawCryptContext cryptContext, byte[] pData, int nDataLen, byte[] pResult, SWIGTYPE_p_int pnResultLen, boolean arg5) {
00110 pkif_moduleJNI.CPKIFCryptoPPRaw_Encrypt__SWIG_2(swigCPtr, this, IPKIFRawCryptContext.getCPtr(cryptContext), cryptContext, pData, nDataLen, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen), arg5);
00111 }
00112
00113 public IPKIFRawCryptContext HMACInit(CPKIFKeyMaterial key, HASH_ALG ha) {
00114 long cPtr = pkif_moduleJNI.CPKIFCryptoPPRaw_HMACInit(swigCPtr, this, CPKIFKeyMaterial.getCPtr(key), key, ha.swigValue());
00115 return (cPtr == 0) ? null : new IPKIFRawCryptContext(cPtr, false);
00116 }
00117
00118 public void HMACUpdate(IPKIFRawCryptContext ctx, byte[] pData, int nDataLen) {
00119 pkif_moduleJNI.CPKIFCryptoPPRaw_HMACUpdate(swigCPtr, this, IPKIFRawCryptContext.getCPtr(ctx), ctx, pData, nDataLen);
00120 }
00121
00122 public void HMACFinal(IPKIFRawCryptContext ctx, byte[] pResult, SWIGTYPE_p_int pnResultLen) {
00123 pkif_moduleJNI.CPKIFCryptoPPRaw_HMACFinal(swigCPtr, this, IPKIFRawCryptContext.getCPtr(ctx), ctx, pResult, SWIGTYPE_p_int.getCPtr(pnResultLen));
00124 }
00125
00126 public final static int thisComponent = pkif_moduleJNI.CPKIFCryptoPPRaw_thisComponent_get();
00127
00128 }