CryptoSys PKI Pro Manual

RSA_ReadEncPrivateKey

Reads from an encrypted PKCS#8 private key info file into an "internal" private key string. [Superseded by RSA_ReadAnyPrivateKey.]

VBA/VB6 Syntax

Public Declare Function RSA_ReadEncPrivateKey Lib "diCrPKI.dll" (ByVal strPrivateKey As String, ByVal nOutChars As Long, ByVal strEpkFileName As String, ByVal strPassword As String, ByVal nOptions As Long) As Long

nRet = RSA_ReadEncPrivateKey(strPrivateKey, nOutChars, strEpkFileName, strPassword, nOptions) As Long

C/C++ Syntax

long __stdcall RSA_ReadEncPrivateKey(char *szOutput, long nOutChars, const char *szEpkFile, const char *szPassword, long nOptions);

Parameters

szOutput
[out] to receive encoded private key data in "internal" format.
nOutChars
[in] specifying the maximum number of characters to be received.
szEpkFile
[in] specifying the filename of a PKCS-8 encrypted private key info file (or a string containing the key in PEM format).
szPassword
[in] containing the password
nOptions
[in] not used in this release. Specify zero.

Returns (VBA/C)

If successful, the return value is the number of characters in or required for the output string; otherwise it returns a negative error code.

.NET Equivalent

Rsa.ReadEncPrivateKey Method

Remarks

Only PKCS-8 EncryptedPrivateKeyInfo data using the rsaEncryption algorithm is supported. The file must be either in binary BER-encoded format or PEM format.

See Also

RSA_SaveEncPrivateKey RSA_ReadPrivateKeyInfo RSA_SavePrivateKeyInfo RSA_GetPrivateKeyFromPFX

[Contents] [Index]

[PREV: RSA_ReadAnyPublicKey...]   [Contents]   [Index]   
   [NEXT: RSA_ReadPrivateKeyFromPFX...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.