Discuss this help topic in SecureBlackbox Forum

TElMessageVerifier.VerifyDetached

TElMessageVerifier     See also     


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


This method verifies digitally signed data when the signature is detached.

Declaration

[C#/Java]
    int VerifyDetached(byte[] Buffer, byte[] Signature);
    int VerifyDetached(byte[] InBuffer, int InStartIndex, int InSize, byte[] SigBuffer, int SigStartIndex, int SigSize);
    int VerifyDetached(System.IO.Stream InStream, System.IO.Stream SigStream, long InCount, long SigCount);

[VB.NET]
    Function VerifyDetached(ByVal Buffer As Byte(), ByVal Signature As Byte()) As Integer
    Function VerifyDetached(ByVal InBuffer As Byte(), ByVal InStartIndex As Integer, ByVal InSize As Integer, ByVal SigBuffer As Byte(), ByVal SigStartIndex As Integer, ByVal SigSize As Integer) As Integer
    Function VerifyDetached(ByVal InStream As System.IO.Stream, ByVal SigStream As System.IO.Stream, ByVal InCount As Long, ByVal SigCount As Long) As Integer

[Pascal]
    function VerifyDetached(Buffer : pointer; Size : integer; Signature : pointer; SignatureSize : integer) : integer; overload; virtual;
    function VerifyDetached(InStream, SigStream : TStream; InCount : Int64 = 0; SigCount : Int64 = 0) : integer; overload;

[C++]
    int32_t VerifyDetached(void * Buffer, int32_t Size, void * Signature, int32_t SignatureSize);
    int32_t VerifyDetached(TStream &InStream, TStream &SigStream, int64_t InCount, int64_t SigCount);
    int32_t VerifyDetached(TStream *InStream, TStream *SigStream, int64_t InCount, int64_t SigCount);

[PHP]
    integer VerifyDetached(TSBPointer|array of byte|string|NULL $Buffer, integer $Size, TSBPointer|array of byte|string|NULL $Signature, integer $SignatureSize)
    integer VerifyDetached(TStream $InStream, TStream $SigStream, integer $InCount, integer $SigCount)

Parameters

  • Buffer (InBuffer) - Pointer to the original data buffer
  • InStartIndex - Starting index of the data to be verified in the InBuffer.
  • Size - Size of input data in bytes
  • Signature (SigBuffer) - Pointer to buffer with the digital signature in PKCS#7 format
  • SigStartIndex - Starting index of the resulting data in the SigBuffer.
  • SignatureSize (SigSize) - Size of Signature parameter in bytes
  • InStream - Stream with data to be verified.
  • 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.
  • SigStream - Stream with the signature.
  • SigCount - Number of bytes to be read from SigStream.If this parameter is 0 the data is read till the end of the stream.
    Default value is 0.
  • Buffer - ...
  • Size - ...
  • Signature - ...
  • SignatureSize - ...

Return value

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

Possible values:


Description

    Use this method to verify the detached digital signature for a message. Signature should be presented in PKCS#7 format.

    Message is validated using certificates which it contains. If message does not contain the appropriate certificate, certificates from CertStorage are used.

    Check Certificates property after calling this method to get certificates which are included in message.

See also:     CertStorage     Certificates     Verify     ErrorInfo    

Discuss this help topic in SecureBlackbox Forum