IPKIFKeyAgreeContext.java
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.orionsec.jpkif;
00010
00011 public class IPKIFKeyAgreeContext {
00012 private long swigCPtr;
00013 protected boolean swigCMemOwn;
00014
00015 public IPKIFKeyAgreeContext(long cPtr, boolean cMemoryOwn) {
00016 swigCMemOwn = cMemoryOwn;
00017 swigCPtr = cPtr;
00018 }
00019
00020 public static long getCPtr(IPKIFKeyAgreeContext 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_IPKIFKeyAgreeContext(swigCPtr);
00033 }
00034 swigCPtr = 0;
00035 }
00036 }
00037
00038 public void SetAlgorithm(CPKIFAlgorithm alg) {
00039 pkif_moduleJNI.IPKIFKeyAgreeContext_SetAlgorithm(swigCPtr, this, CPKIFAlgorithm.getCPtr(alg), alg);
00040 }
00041
00042 public CPKIFAlgorithm GetAlgorithm() {
00043 long cPtr = pkif_moduleJNI.IPKIFKeyAgreeContext_GetAlgorithm(swigCPtr, this);
00044 return (cPtr == 0) ? null : new CPKIFAlgorithm(cPtr, false);
00045 }
00046
00047 public void PrependSharedInfo(CPKIFBufferPtr data) {
00048 pkif_moduleJNI.IPKIFKeyAgreeContext_PrependSharedInfo(swigCPtr, this, CPKIFBufferPtr.getCPtr(data), data);
00049 }
00050
00051 public void AppendSharedInfo(CPKIFBufferPtr data) {
00052 pkif_moduleJNI.IPKIFKeyAgreeContext_AppendSharedInfo(swigCPtr, this, CPKIFBufferPtr.getCPtr(data), data);
00053 }
00054
00055 public CPKIFBufferList GetPrependedSharedInfo() {
00056 return new CPKIFBufferList(pkif_moduleJNI.IPKIFKeyAgreeContext_GetPrependedSharedInfo(swigCPtr, this), false);
00057 }
00058
00059 public CPKIFBufferList GetAppendedSharedInfo() {
00060 return new CPKIFBufferList(pkif_moduleJNI.IPKIFKeyAgreeContext_GetAppendedSharedInfo(swigCPtr, this), false);
00061 }
00062
00063 public void SetOwner(SWIGTYPE_p_IPKIFCryptoKeyAgree owner) {
00064 pkif_moduleJNI.IPKIFKeyAgreeContext_SetOwner(swigCPtr, this, SWIGTYPE_p_IPKIFCryptoKeyAgree.getCPtr(owner));
00065 }
00066
00067 public SWIGTYPE_p_IPKIFCryptoKeyAgree GetOwner() {
00068 long cPtr = pkif_moduleJNI.IPKIFKeyAgreeContext_GetOwner(swigCPtr, this);
00069 return (cPtr == 0) ? null : new SWIGTYPE_p_IPKIFCryptoKeyAgree(cPtr, false);
00070 }
00071
00072 }