Discuss this help topic in SecureBlackbox Forum


TElX509Certificate     See also     

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

Saves the certificate to the memory buffer in PEM format.


    bool SaveToBufferPEM(out byte[] Buffer, string PassPhrase);
    bool SaveToBufferPEM(ref byte[] Buffer, ref int Size, string PassPhrase);

    Function SaveToBufferPEM(Out Buffer As Byte(), ByVal PassPhrase As String) As Boolean
    Function SaveToBufferPEM(ByRef Buffer As Byte(), ByRef Size As Integer, ByVal PassPhrase As String) As Boolean

    function SaveToBufferPEM(Buffer: Pointer; var Size: integer; PassPhrase : string) : boolean;

    bool SaveToBufferPEM(void * Buffer, int32_t &Size, const std::string &PassPhrase);

    bool SaveToBufferPEM(TSBPointer|array of byte|string|NULL $Buffer, integer &$Size, string $PassPhrase)

    boolean saveToBufferPEM(byte[][] Buffer, int[] Size, String PassPhrase);
    boolean saveToBufferPEM(byte[][] Buffer, String PassPhrase);
    boolean saveToBufferPEM(byte[] Buffer, TSBInteger Size, String PassPhrase);


  • Buffer - the buffer to which the certificate is saved.
  • Size - the size of the buffer to which the data is saved. When the method returns, Size parameter contains the size of the data that were saved, or, if the buffer was too small, the size of the buffer enough to hold the data.
  • PassPhrase - the pass phrase to encrypt the certificate. If the certificate shouldn't be encrypted, set this parameter to empty string.

Return value

    True on success.
    False if the buffer size is too small. In this case this method sets Size parameter to the actual size of encoded certificate.


    This method saves the certificate to the provided memory location of the given size. If the buffer is too small (or empty), Size parameter is set to the size which will be enough to hold the whole data. The certificate is saved in PEM format.

See also:     LoadFromBuffer     SaveToStream    

Discuss this help topic in SecureBlackbox Forum