Discuss this help topic in SecureBlackbox Forum

TElX509Certificate.SaveKeyValueToBuffer

TElX509Certificate     See also     


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


Saves the private key of the certificate to the memory buffer.

Declaration

[C#]
    bool SaveKeyValueToBuffer(out byte[] Buffer);
    bool SaveKeyValueToBuffer(ref byte[] Buffer, ref int Size);

[VB.NET]
    Function SaveKeyValueToBuffer(Out Buffer As Byte()) As Boolean
    Function SaveKeyValueToBuffer(ByRef Buffer As Byte(), ByRef Size As Integer) As Boolean

[Pascal]
    function SaveKeyValueToBuffer(Buffer: Pointer; var Size: integer): boolean;

[C++]
    bool SaveKeyValueToBuffer(void * Buffer, int32_t &Size);

[PHP]
    bool SaveKeyValueToBuffer(TSBPointer|array of byte|string|NULL $Buffer, integer &$Size)

[Java]
    boolean saveKeyValueToBuffer(byte[][] Buffer, int[] Size);
    boolean saveKeyValueToBuffer(byte[][] Buffer);

Parameters

  • Buffer - the buffer to which the private key is saved.
  • Size - the size of the buffer to which the private key 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.

Return value

    True on success.
    False if the buffer size is too small. In this case this method sets Size parameter is set to the size which will be enough to hold the whole data.

Description

    This method saves the private key to the provided memory location of the given size.
Be sure to check if the private key exists and is extractable before calling this method.

Discuss this help topic in SecureBlackbox Forum