KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > oyster > cms > SignatureValue


1 /*
2  * Title: Oyster Project
3  * Description: S/MIME email sending capabilities
4  * @Author Vladimir Radisic
5  * @Version 2.1.5
6  */

7
8
9 package org.enhydra.oyster.cms;
10
11 import org.enhydra.oyster.crypto.SigningProcessor;
12 import org.enhydra.oyster.exception.SMIMEException;
13 import org.enhydra.oyster.der.DEROctetString;
14 import java.security.PrivateKey JavaDoc;
15
16
17 /**
18  * SignatureValue class is DER encoded octet string for holding signature
19  * values represented in ASN.1 notation according to RFC2630.<BR>
20  * <BR>
21  * SignatureValue ::= OCTET STRING<BR>
22  */

23 public class SignatureValue extends DEROctetString {
24
25 /**
26  * For creating signature values necessary information are: data for signing as byte
27  * array, type of signing algorithm, and private key for performing of asymmetric
28  * encryption.
29  * @param forSigning0 information for signing
30  * @param key0 private key (DSA or RSA depend on type of signing)
31  * @param signAlg0 type of signing algorithm (can be SHA1_WITH_RSA, MD2_WITH_RSA,
32  * MD5_WITH_RSA or SHA1_WITH_DSA).
33  * @exception SMIMEException thrown in super class constructor.
34  */

35   public SignatureValue (byte[] forSigning0, PrivateKey JavaDoc key0, String JavaDoc signAlg0) throws SMIMEException
36   {
37     super(SigningProcessor.getSignature(forSigning0, key0, signAlg0));
38   }
39 }
40
41
42
43
Popular Tags