<link>http://www.ncryptoki.com/forum.aspx</link> <description /> <docs>http://www.rssboard.org/rss-specification</docs> <generator>mojoPortal Forum module</generator> <item> <title>Re: Sha256 RSA signature You can set your mechanism by using this code.

Mechanism mechanism = new Mechanism(Mechanism.CKM_SHA256_RSA_PKCS, null);

and then sign with this code:

nRes = session.SignInit(mechanism, privateKey);

 

 

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=305~-1#post1066 fgonzalezaguirre http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Tue, 04 Apr 2017 18:11:44 GMT Sha256 RSA signature Hello,

We've been working with NCryptoki for quite a while, but we've been using SHA1 signatures until now.

A recent project requires us to switch to RSA + SHA256 for signature and verification purposes.

Currently we are using the code showed in the documentation:

    nRes = session.SignInit(Mechanism.SHA1_RSA_PKCS, privateKey);

From what I can see, I'd have to switch to:

    nRes = session.SignInit(Mechanism.CKM_SHA256_RSA_PKCS, privateKey);

Is this correct? Also, it gives me a compile error ("Cannot convert from int to Cryptware.NCryptoki.Mechanism)

How would I go around to actually signing data with SHA256 + RSA?

 

Thank you for your time,

 

Fernando

 


 

]]>
http://www.ncryptoki.com/Forums/Thread.aspx?pageid=9&t=305~-1#post1065 fgonzalezaguirre http://www.ncryptoki.com/Forums/Thread.aspx?pageid= Tue, 04 Apr 2017 17:53:26 GMT