KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > model > ca > catoken > CATokenInfo


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13  
14 package org.ejbca.core.model.ca.catoken;
15
16 import java.io.Serializable JavaDoc;
17
18 /**
19  * Holds nonsensitive information about a CAToken.
20  *
21  * @version $Id: CATokenInfo.java,v 1.3 2006/10/31 08:19:41 anatom Exp $
22  */

23 public abstract class CATokenInfo extends CATokenConstants implements Serializable JavaDoc {
24
25     /**
26      * Determines if a de-serialized file is compatible with this class.
27      *
28      * Maintainers must change this value if and only if the new version
29      * of this class is not compatible with old versions. See Sun docs
30      * for <a HREF=http://java.sun.com/products/jdk/1.1/docs/guide
31      * /serialization/spec/version.doc.html> details. </a>
32      *
33      */

34     private static final long serialVersionUID = -8484441028763008079L;
35
36     /** Default algorithm i SHA1WithRSA, can be set to any of the supported constants */
37     private String JavaDoc signaturealgoritm = SIGALG_SHA1_WITH_RSA;
38     /** Default algorithm i SHA1WithRSA, can be set to any of the supported constants */
39     private String JavaDoc encryptionalgoritm = SIGALG_SHA1_WITH_RSA;
40     
41     public CATokenInfo(){}
42     
43     /**
44      * Method to retrieve which algoritm that should be used for signing certificate.
45      */

46     public String JavaDoc getSignatureAlgorithm(){ return signaturealgoritm; }
47     /** Default algorithm i SHA1WithRSA, can be set to any of the supported constants
48      * @param signaturealgorithm Any of the supported algorithms CATokenInfo.SIGALG_XX
49      */

50     public void setSignatureAlgorithm(String JavaDoc signaturealgoritm){ this.signaturealgoritm=signaturealgoritm;}
51     /**
52      * Method to retrieve which algoritm that should be used for encryption certificate.
53      */

54     public String JavaDoc getEncryptionAlgorithm(){ return encryptionalgoritm; }
55     /** Default algorithm i SHA1WithRSA, can be set to any of the supported constants
56      * @param encryptionalgoritm Any of the supported algorithms CATokenInfo.SIGALG_XX
57      */

58     public void setEncryptionAlgorithm(String JavaDoc encryptionalgoritm){ this.encryptionalgoritm=encryptionalgoritm;}
59     
60 }
61
Popular Tags