cancel
Showing results for 
Search instead for 
Did you mean: 

Need to create Digital Signature & Encrypt the File

Former Member
0 Kudos
87

Hi Experts,

I have an requirement, I need to create a module in which I need to pass four values (Namely signing key, signing algorithm, encyption key and encryption algorithm) through parameters as inputs. Based on these parameters, I need to create the signature for the input xml file and I have to encrypted the file. Please Guide me. Give some useful links, documents or codes to how to do this. Help me in this regard.

Thanks in Advance,

Venkatesh.K

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have a look at the Java cryptographic arhictecture and start from there

http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html

Start with that, and do some google searches

Note that SAP Java AS is using the IAIK security library(http://jce.iaik.tugraz.at/) on top of Java cryptographic arhictecture and therefore will support more cryptographic algorithms

Regards

Dagfinn

Former Member
0 Kudos

Hi Venkatesh,

The use of SsfDataSMIME class is the same as for SsfDataXML because both implement the same interface ISsfData. The only differences between them are the construction methods.

To create a instance from SsfDataSMIME class you have to pass two arguments: the (MIME) message itself, as InputStream or MimeMessage object, and the context of the (MIME) message that can be null.

After that you can sign and/or encrypt the (MIME) message the same way, using the same methods, like you did for SsfDataXML object.

Hope it helps.

Please reward if so.

Regards

Alexandre

Former Member
0 Kudos

Hi Alexandre,

Could you tell me in which Java package are these classes and interfaces implemented?

I cannot find the ISsfData interface and the SsfDataXML class anywhere.

Many thanks,

Aldo

Former Member
0 Kudos

Hi Aldo,

The java packages where this classes and interfaces are implemented are:

- com.sap.security.api.ssf

- com.sap.security.core.server.ssf

You can find this in the jar file tc_sec_ssf.jar.

Also look the following SAP Help link [Secure Store and Forward Mechanism (SSF)|http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/bf6f77a2c5446a86e0152f1b309db6/frameset.htm]

Please reward if helpful.

Regards

Alexandre

Former Member
0 Kudos

Hi Alexandre,

Thanks very much! I wish I could give you points for this as you solved my issue.

If you are interested place the same answer in here:

and I will assign you the points.

Best regards,

Aldo

Answers (0)