Reads from an RSA public key file into an "internal" public key string.
[Superseded by RSA_ReadAnyPublicKey
.]
Public Declare Function RSA_ReadPublicKey Lib "diCrPKI.dll"
(ByVal strPublicKey As String, ByVal nOutChars As Long, ByVal strKeyFileName As String,
ByVal nOptions As Long) As Long
nRet = RSA_ReadPublicKey(strPublicKey, nOutChars,
strKeyFileName, nOptions) As Long
long __stdcall RSA_ReadPublicKey(char *szOutput, long nOutChars, const char *szPubKeyFile, long nOptions);
If successful, the return value is the number of characters in or required for the output string; otherwise it returns a negative error code.
Public Function rsaReadPublicKey
(szKeyFileOrString As String, Optional nOptions As Long = 0) As String
Both PKCS-1 RSAPublicKey
and OpenSSL SubjectPublicKeyInfo
formats are supported.
The file can be in binary BER-encoded format or PEM format, or be passed as a string containing the data in PEM format.
Call the function with an empty or NULL szOutput string or zero nOutChars parameter to find out the required length of
the output string. C/C++ users should add one to this value when allocating memory.
RSA_ReadAnyPublicKey RSA_SavePublicKey RSA_GetPublicKeyFromCert