01: /*
02: * Title: Oyster Project
03: * Description: S/MIME email sending capabilities
04: * @Author Vladimir Radisic
05: * @Version 2.1.5
06: */
07:
08: package org.enhydra.oyster.cms;
09:
10: import org.enhydra.oyster.crypto.SigningProcessor;
11: import org.enhydra.oyster.exception.SMIMEException;
12: import org.enhydra.oyster.der.DEROctetString;
13: import java.security.PrivateKey;
14:
15: /**
16: * SignatureValue class is DER encoded octet string for holding signature
17: * values represented in ASN.1 notation according to RFC2630.<BR>
18: * <BR>
19: * SignatureValue ::= OCTET STRING<BR>
20: */
21: public class SignatureValue extends DEROctetString {
22:
23: /**
24: * For creating signature values necessary information are: data for signing as byte
25: * array, type of signing algorithm, and private key for performing of asymmetric
26: * encryption.
27: * @param forSigning0 information for signing
28: * @param key0 private key (DSA or RSA depend on type of signing)
29: * @param signAlg0 type of signing algorithm (can be SHA1_WITH_RSA, MD2_WITH_RSA,
30: * MD5_WITH_RSA or SHA1_WITH_DSA).
31: * @exception SMIMEException thrown in super class constructor.
32: */
33: public SignatureValue(byte[] forSigning0, PrivateKey key0,
34: String signAlg0) throws SMIMEException {
35: super(SigningProcessor
36: .getSignature(forSigning0, key0, signAlg0));
37: }
38: }
|