CPKIFKeyTransRecipientInfo.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 CPKIFKeyTransRecipientInfo {
00012 private long swigCPtr;
00013 protected boolean swigCMemOwn;
00014
00015 public CPKIFKeyTransRecipientInfo(long cPtr, boolean cMemoryOwn) {
00016 swigCMemOwn = cMemoryOwn;
00017 swigCPtr = cPtr;
00018 }
00019
00020 public static long getCPtr(CPKIFKeyTransRecipientInfo 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_CPKIFKeyTransRecipientInfo(swigCPtr);
00033 }
00034 swigCPtr = 0;
00035 }
00036 }
00037
00038 public CPKIFKeyTransRecipientInfo() {
00039 this(pkif_moduleJNI.new_CPKIFKeyTransRecipientInfo__SWIG_0(), true);
00040 }
00041
00042 public CPKIFKeyTransRecipientInfo(CPKIFBufferPtr ktriBuf) {
00043 this(pkif_moduleJNI.new_CPKIFKeyTransRecipientInfo__SWIG_1(CPKIFBufferPtr.getCPtr(ktriBuf), ktriBuf), true);
00044 }
00045
00046 public CPKIFKeyTransRecipientInfo.RecipientIdentifierChoice GetRecipientIdentifierChoice() {
00047 return CPKIFKeyTransRecipientInfo.RecipientIdentifierChoice.swigToEnum(pkif_moduleJNI.CPKIFKeyTransRecipientInfo_GetRecipientIdentifierChoice(swigCPtr, this));
00048 }
00049
00050 public CPKIFIssuerAndSerialNumberPtr GetIssuerAndSerialNumber() {
00051 return new CPKIFIssuerAndSerialNumberPtr(pkif_moduleJNI.CPKIFKeyTransRecipientInfo_GetIssuerAndSerialNumber(swigCPtr, this), true);
00052 }
00053
00054 public CPKIFBufferPtr GetSKID() {
00055 return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFKeyTransRecipientInfo_GetSKID(swigCPtr, this), true);
00056 }
00057
00058 public CPKIFAlgorithmIdentifierPtr GetKeyEncryptionAlgorithm() {
00059 return new CPKIFAlgorithmIdentifierPtr(pkif_moduleJNI.CPKIFKeyTransRecipientInfo_GetKeyEncryptionAlgorithm(swigCPtr, this), true);
00060 }
00061
00062 public CPKIFBufferPtr GetEncryptedKey() {
00063 return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFKeyTransRecipientInfo_GetEncryptedKey(swigCPtr, this), true);
00064 }
00065
00066 public final static class RecipientIdentifierChoice {
00067 public final static RecipientIdentifierChoice ISSUERSERIAL = new RecipientIdentifierChoice("ISSUERSERIAL");
00068 public final static RecipientIdentifierChoice SKID = new RecipientIdentifierChoice("SKID");
00069 public final static RecipientIdentifierChoice UNSET = new RecipientIdentifierChoice("UNSET");
00070
00071 public final int swigValue() {
00072 return swigValue;
00073 }
00074
00075 public String toString() {
00076 return swigName;
00077 }
00078
00079 public static RecipientIdentifierChoice swigToEnum(int swigValue) {
00080 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00081 return swigValues[swigValue];
00082 for (int i = 0; i < swigValues.length; i++)
00083 if (swigValues[i].swigValue == swigValue)
00084 return swigValues[i];
00085 throw new IllegalArgumentException("No enum " + RecipientIdentifierChoice.class + " with value " + swigValue);
00086 }
00087
00088 private RecipientIdentifierChoice(String swigName) {
00089 this.swigName = swigName;
00090 this.swigValue = swigNext++;
00091 }
00092
00093 private RecipientIdentifierChoice(String swigName, int swigValue) {
00094 this.swigName = swigName;
00095 this.swigValue = swigValue;
00096 swigNext = swigValue+1;
00097 }
00098
00099 private RecipientIdentifierChoice(String swigName, RecipientIdentifierChoice swigEnum) {
00100 this.swigName = swigName;
00101 this.swigValue = swigEnum.swigValue;
00102 swigNext = this.swigValue+1;
00103 }
00104
00105 private static RecipientIdentifierChoice[] swigValues = { ISSUERSERIAL, SKID, UNSET };
00106 private static int swigNext = 0;
00107 private final int swigValue;
00108 private final String swigName;
00109 }
00110
00111 }