Discuss this help topic in SecureBlackbox Forum

TElPublicKeyCrypto.Sign

TElPublicKeyCrypto     See also     


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


Signs the chunk of data

Declaration

[C#]
    void Sign(byte[] InBuffer, int InIndex, int InSize, ref byte[] OutBuffer, int OutIndex, ref int OutSize);
    void Sign(System.IO.Stream InStream, System.IO.Stream OutStream, int Count);

[VB.NET]
    Sub Sign(ByVal InBuffer As Byte(), ByVal InIndex As Integer, ByVal InSize As Integer, ByRef OutBuffer As Byte(), ByVal OutIndex As Integer, ByRef OutSize As Integer)
    Sub Sign(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal Count As Integer)

[Pascal]
    procedure Sign(InBuffer: pointer; InSize: integer; OutBuffer: pointer; var OutSize: integer);
    procedure Sign(InStream, OutStream : TStream; Count : integer = 0);

[C++]
    void Sign(void * InBuffer, int32_t InSize, void * OutBuffer, int32_t &OutSize);
    void Sign(TStream &InStream, TStream &OutStream, int32_t Count);
    void Sign(TStream *InStream, TStream *OutStream, int32_t Count);

[PHP]
    void Sign(TSBPointer|array of byte|string|NULL $InBuffer, integer $InSize, TSBPointer|array of byte|string|NULL $OutBuffer, integer &$OutSize)
    void Sign(TStream $InStream, TStream $OutStream, integer $Count)

[Java]
    void sign(InputStream InStream, OutputStream OutStream, int Count);
    int sign(byte[] InBuffer, int InIndex, int InSize, byte[] OutBuffer, int OutIndex, int OutSize);

Parameters

  • InBuffer - data buffer to sign
  • InIndex - offset of actual data from the beginning of the array
  • InSize - size of input data in bytes
  • OutBuffer - buffer where to put signeded data
  • OutIndex - output buffer start offset
  • OutSize - the maximal expected size of output data in bytes
  • InStream - the stream with data to sign.
  • OutStream - the stream for signed data.
  • Count - the number of bytes to be read. If this parameter is zero, the whole stream is processed.
    Default value is 0.

Description

    Use this method to sign the chunk of data with a key, specified by the KeyMaterial property, and create an enveloping signature. Not all algorithms support enveloping signatures. For example, with RSA algorithm, the exception will be thrown if you try to use Sign() method.

    You can sign the data or its hash with this method. Use InputIsHash property to specify whether you pass the hash, or the data itself. In the latter case, the hash of the data will be calculated according to the value of HashAlgorithm property.

See also:     HashAlgorithm     InputIsHash     Decrypt     SignDetached     Verify    

Discuss this help topic in SecureBlackbox Forum