RsaKeyHashCode(StringBuilder) Method |
Compute the hash code of an "internal" RSA public or private key string.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.25611 (23.0.0.0)
Syntaxpublic static int KeyHashCode(
StringBuilder sbKeyString
)
Public Shared Function KeyHashCode (
sbKeyString As StringBuilder
) As Integer
Parameters
- sbKeyString StringBuilder
- Internal key string
Return Value
Int32A 32-bit hash code for the key, or zero on error.
Example
StringBuilder sbPrivateKey = Rsa.ReadPrivateKey("lamps-alice.p8", "");
StringBuilder sbPublicKey = Rsa.ReadPublicKey("lamps-alice.cer");
Console.WriteLine("Private Key: Rsa.KeyHashCode={0,8:X}", Rsa.KeyHashCode(sbPrivateKey.ToString()));
Console.WriteLine("Public Key: Rsa.KeyHashCode={0,8:X}", Rsa.KeyHashCode(sbPublicKey.ToString()));
See Also