I have a strange problem. In my code, I create a sha512 hash algorithm and sign some data with it. Now I would expect the hash to be 512 bits in length, but its 128. What error did I make?
My code is:
var hashAlgorithm = HashAlgorithm.Create( โSHA512" ); var signedhHash = rsaCryptoServiceProvider.SignData( plainData, hashAlgorithm );
PS. Ive downloaded the RSA keys from the file that Ive created with the following script:
makecert -r -n "CN=myCert" -sky exchange -sy 24 -sv myCert.pvk myCert.cer cert2spc myCert.cer myCert.spc pvk2pfx -pvk myCert.pvk -spc myCert.spc -pfx myCert.pfx โf
Edit:
I got the length from signedhHash.Length , which is 128.
source share