CPKIFAlgorithm.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 CPKIFAlgorithm {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   public CPKIFAlgorithm(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   public static long getCPtr(CPKIFAlgorithm 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_CPKIFAlgorithm(swigCPtr);
00033       }
00034       swigCPtr = 0;
00035     }
00036   }
00037 
00038   public CPKIFAlgorithm(String description, HASH_ALG alg, int digestsize) {
00039     this(pkif_moduleJNI.new_CPKIFAlgorithm__SWIG_0(description, alg.swigValue(), digestsize), true);
00040   }
00041 
00042   public CPKIFAlgorithm(String description, SYMKEY_ALG alg, SYMKEY_MODE mode, int keylen, int blocksize) {
00043     this(pkif_moduleJNI.new_CPKIFAlgorithm__SWIG_1(description, alg.swigValue(), mode.swigValue(), keylen, blocksize), true);
00044   }
00045 
00046   public CPKIFAlgorithm(String description, ASYMKEY_ALG alg) {
00047     this(pkif_moduleJNI.new_CPKIFAlgorithm__SWIG_2(description, alg.swigValue()), true);
00048   }
00049 
00050   public CPKIFAlgorithm(String description, ASYMKEY_ALG ka, HASH_ALG ha) {
00051     this(pkif_moduleJNI.new_CPKIFAlgorithm__SWIG_3(description, ka.swigValue(), ha.swigValue()), true);
00052   }
00053 
00054   public CPKIFAlgorithm() {
00055     this(pkif_moduleJNI.new_CPKIFAlgorithm__SWIG_4(), true);
00056   }
00057 
00058   public static CPKIFAlgorithm GetAlg(HASH_ALG alg) {
00059     long cPtr = pkif_moduleJNI.CPKIFAlgorithm_GetAlg__SWIG_0(alg.swigValue());
00060     return (cPtr == 0) ? null : new CPKIFAlgorithm(cPtr, false);
00061   }
00062 
00063   public static CPKIFAlgorithm GetAlg(SYMKEY_ALG alg, SYMKEY_MODE mode) {
00064     long cPtr = pkif_moduleJNI.CPKIFAlgorithm_GetAlg__SWIG_1(alg.swigValue(), mode.swigValue());
00065     return (cPtr == 0) ? null : new CPKIFAlgorithm(cPtr, false);
00066   }
00067 
00068   public static CPKIFAlgorithm GetAlg(SYMKEY_ALG alg) {
00069     long cPtr = pkif_moduleJNI.CPKIFAlgorithm_GetAlg__SWIG_2(alg.swigValue());
00070     return (cPtr == 0) ? null : new CPKIFAlgorithm(cPtr, false);
00071   }
00072 
00073   public static CPKIFAlgorithm GetAlg(ASYMKEY_ALG alg) {
00074     long cPtr = pkif_moduleJNI.CPKIFAlgorithm_GetAlg__SWIG_3(alg.swigValue());
00075     return (cPtr == 0) ? null : new CPKIFAlgorithm(cPtr, false);
00076   }
00077 
00078   public static CPKIFAlgorithm GetAlg(CPKIFOIDPtr oid) {
00079     long cPtr = pkif_moduleJNI.CPKIFAlgorithm_GetAlg__SWIG_4(CPKIFOIDPtr.getCPtr(oid), oid);
00080     return (cPtr == 0) ? null : new CPKIFAlgorithm(cPtr, false);
00081   }
00082 
00083   public static void init() {
00084     pkif_moduleJNI.CPKIFAlgorithm_init();
00085   }
00086 
00087   public String Description() {
00088     return pkif_moduleJNI.CPKIFAlgorithm_Description(swigCPtr, this);
00089   }
00090 
00091   public int BlockSize() {
00092     return pkif_moduleJNI.CPKIFAlgorithm_BlockSize(swigCPtr, this);
00093   }
00094 
00095   public int DigestSize() {
00096     return pkif_moduleJNI.CPKIFAlgorithm_DigestSize(swigCPtr, this);
00097   }
00098 
00099   public int KeySize() {
00100     return pkif_moduleJNI.CPKIFAlgorithm_KeySize(swigCPtr, this);
00101   }
00102 
00103   public boolean NeedsIV() {
00104     return pkif_moduleJNI.CPKIFAlgorithm_NeedsIV(swigCPtr, this);
00105   }
00106 
00107   public HASH_ALG HashAlg() {
00108     return HASH_ALG.swigToEnum(pkif_moduleJNI.CPKIFAlgorithm_HashAlg(swigCPtr, this));
00109   }
00110 
00111   public SYMKEY_ALG SymkeyAlg() {
00112     return SYMKEY_ALG.swigToEnum(pkif_moduleJNI.CPKIFAlgorithm_SymkeyAlg(swigCPtr, this));
00113   }
00114 
00115   public SYMKEY_MODE SymkeyMode() {
00116     return SYMKEY_MODE.swigToEnum(pkif_moduleJNI.CPKIFAlgorithm_SymkeyMode(swigCPtr, this));
00117   }
00118 
00119   public ASYMKEY_ALG AsymkeyAlg() {
00120     return ASYMKEY_ALG.swigToEnum(pkif_moduleJNI.CPKIFAlgorithm_AsymkeyAlg(swigCPtr, this));
00121   }
00122 
00123   public CPKIFOIDPtr OID() {
00124     return new CPKIFOIDPtr(pkif_moduleJNI.CPKIFAlgorithm_OID(swigCPtr, this), true);
00125   }
00126 
00127 }

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