Computes the hash code of an "internal" RSA public or private key string.
Public Declare Function RSA_KeyHashCode Lib "diCrPKI.dll"
(ByVal strKey As String) As Long
nRet = RSA_KeyHashCode(strKey)
String containing the RSA private or public key string in internal format.
long _stdcall RSA_KeyHashCode(const char *szKeyString);
Long: A 32-bit hash code for the key, or zero on error.
Rsa.KeyHashCode Method (String)
Rsa.KeyHashCode Method (StringBuilder)
Use this function to compare internal key strings. As of version 3.0, internal key strings are encrypted
and cannot be compared directly.
The actual string values may or may not be the same even though the underlying key is.
The hash code value will be the same for a given key.
The hash code is computed to an internal algorithm and may return any integer value
between -2,147,483,648 and 2,147,483,647 (-231 to 231-1).
If the key string is invalid, the return value is zero. Just remember there is approximately a one in 4 billion chance that a valid key string
may actually have a hash code of zero, similar to the odds of winning the top prize in a US state lottery,
so if you've found one, you've just missed out.
[Ver 3.3] The same public or private key string should now return the same hash code value.
Earlier versions would have returned a different value for the private and public strings.
See the example in RSA_ReadPrivateKeyInfo.