Discuss this help topic in SecureBlackbox Forum

TElCustomCertStorage.SaveToBufferPEM

TElCustomCertStorage     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Saves the certificates to the memory buffer in PEM format.

Declaration

[C#]
    bool SaveToBufferPEM(ref byte[] Buffer, ref int Size, string Password);
    bool SaveToBufferPEM(ref byte[] Buffer, ref int Size, string Password, int EncryptionAlgorithm, TSBSymmetricCryptoMode EncryptionMode);

[VB.NET]
    Function SaveToBufferPEM(ByRef Buffer As Byte(), ByRef Size As Integer, ByVal Password As String) As Boolean
    Function SaveToBufferPEM(ByRef Buffer As Byte(), ByRef Size As Integer, ByVal Password As String, ByVal EncryptionAlgorithm As Integer, ByVal EncryptionMode As TSBSymmetricCryptoMode) As Boolean

[Pascal]
    function SaveToBufferPEM(Buffer : pointer; var Size : longint; const Password : string) : boolean;
    function SaveToBufferPEM(Buffer : pointer; var Size : longint; const Password : string; EncryptionAlgorithm : integer; EncryptionMode : TSBSymmetricCryptoMode) : boolean;

[C++]
    bool SaveToBufferPEM(void * Buffer, int32_t &Size, const std::string &Password);
    bool SaveToBufferPEM(void * Buffer, int32_t &Size, const std::string &Password, int32_t EncryptionAlgorithm, TSBSymmetricCryptoMode EncryptionMode);

[PHP]
    bool SaveToBufferPEM(TSBPointer|array of byte|string|NULL $Buffer, integer &$Size, string $Password)
    bool SaveToBufferPEM(TSBPointer|array of byte|string|NULL $Buffer, integer &$Size, string $Password, integer $EncryptionAlgorithm, integer $EncryptionMode)

[Java]
    boolean saveToBufferPEM(byte[] Buffer, TSBInteger Size, String Password);
    boolean saveToBufferPEM(byte[] Buffer, TSBInteger Size, String Password, int EncryptionAlgorithm, TSBSymmetricCryptoMode EncryptionMode);

Parameters

  • Buffer - the buffer where the certificates are saved.
  • Size - the size of the buffer where the data is saved. On return, this parameter contains the size of the data that were saved, or the size of the required buffer if the buffer was too small to hold the data.
  • Password - the password to encrypt the certificates. If the data shouldn't be encrypted, provide an empty string.
  • EncryptionAlgorithm - specifies the encryption algorithm.
  • EncryptionMode - specifies the encryption mode.

Possible modes:

Possible algorithms:

Return value

    Returns True on success, and False if the buffer was too small for the data. In this case, check the Size parameter for the required buffer size.

Description

    Use this method to save the certificates to the memory buffer in PEM format.

See also:     LoadFromStreamPEM     LoadFromBufferPEM     SaveToStreamPEM    

Discuss this help topic in SecureBlackbox Forum