Discuss this help topic in SecureBlackbox Forum


TElMessageSigner     See also     

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

Signs the block of data.


    int Sign(byte[] InBuffer, ref byte[] OutBuffer, ref int OutSize, bool Detached);
    int Sign(byte[] InBuffer, int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, ref int OutSize, bool Detached);
    int Sign(System.IO.Stream InStream, System.IO.Stream OutStream, bool Detached, long InCount);

    Function Sign(ByVal InBuffer As Byte(), ByRef OutBuffer As Byte(), ByRef OutSize As Integer, ByVal Detached As Boolean) As Integer
    Function Sign(ByVal InBuffer As Byte(), ByVal InStartIndex As Integer, ByVal InSize As Integer, ByVal OutBuffer As Byte(), ByVal OutStartIndex As Integer, ByRef OutSize As Integer, ByVal Detached As Boolean) As Integer
    Function Sign(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal Detached As Boolean, ByVal InCount As Long) As Integer

    function Sign(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer; Detached : boolean = false) : integer;
    function Sign(InStream, OutStream : TStream; Detached : boolean = false; InCount : Int64 = 0) : integer;

    int32_t Sign(void * InBuffer, int32_t InSize, void * OutBuffer, int32_t &OutSize, bool Detached);
    int32_t Sign(TStream &InStream, TStream &OutStream, bool Detached, int64_t InCount);
    int32_t Sign(TStream *InStream, TStream *OutStream, bool Detached, int64_t InCount);

    integer Sign(TSBPointer|array of byte|string|NULL $InBuffer, integer $InSize, TSBPointer|array of byte|string|NULL $OutBuffer, integer &$OutSize, bool $Detached)
    integer Sign(TStream $InStream, TStream $OutStream, bool $Detached, integer $InCount)


  • InBuffer - Pointer to the data to be signed
  • InStartIndex - Starting index of the data to be signed in the InBuffer.
  • InSize - Size of input data in bytes
  • OutBuffer - Pointer to the buffer where signed data should be written
  • OutStartIndex - Starting index of the signed data in the OutBuffer.
  • OutSize - Size of OutBuffer in bytes
  • Detached - Specifies whether the detached signature should be created instead of ┬źnormal┬╗ one
  • InStream - Stream to be signed.
  • OutStream - Resulting signed stream.
  • InCount - Number of bytes to be read from InStream. If this parameter is 0 the data is read till the end of the stream.
    Default value is 0.

Return value

    0 if the signing process was completed successfully, and an error code otherwise.

Possible values:


    Use this method to sign blocks of data. Block of data is signed using each certificate from CertStorage, which has the corresponding private key. When Detached parameter is false, the signature is merged with data and the resulting block is returned. If Detached is true, only the signature is returned. Unless IncludeCertificates property is set to false, all certificates from storage are included into the signature. If IncludeCertificates is false, then the signature contains only certificate IDs.

     Note,  that some certificates from storage may not have the corresponding private keys. These certificates are included in signed message too. This is done to create certificate chains and make validation of signing certificate easier.

See also:     CertStorage     HashAlgorithm     IncludeCertificates     Countersign     ErrorInfo    

Discuss this help topic in SecureBlackbox Forum