Signing a hash using private key?

  • Thread starter Thread starter KK
  • Start date Start date
K

KK

Hi,

I want to sign my hash using a private key.

DSACryptoServiceProvider.SignHash method says it
signs using the given private key, but where to give
the key?

public byte[] SignHash(
byte[] rgbHash,
string str <-- this is asking for the name of the hash
algorithm used to create the hash value of the data
);

so where to give the private key to sign the hash?

regards
KK
 
There are properties that set the key. Take a look at the docs for the
constructor of DSACryptoServiceProvider -- they provide some easy samples.
-mike
MVP
 
Back
Top