Discuss this help topic in SecureBlackbox Forum

TElMessageDecryptor.Decrypt

TElMessageDecryptor     See also     


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


Decrypts the PKCS#7-compatible message

Declaration

[C#/Java]
    int Decrypt(byte[] InBuffer,ref byte[] OutBuffer, ref int OutSize);
    int Decrypt(byte[] InBuffer,int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, ref int OutSize);
    int Decrypt(byte[] InBuffer,ref byte[] OutBuffer, ref int OutSize, byte[] Key);
    int Decrypt(byte[] InBuffer,int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, ref int OutSize, byte[] Key);
    int Decrypt(System.IO.Stream InStream, System.IO.Stream OutStream, long InCount /* = 0 */);
    int Decrypt(System.IO.Stream InStream, System.IO.Stream OutStream, byte[] Key, long InCount /* = 0 */);

[VB.NET]
    Function Decrypt(ByVal InBuffer As Byte(), ByRef OutBuffer As Byte(), ByRef OutSize As Integer) As Integer
    Function Decrypt(ByVal InBuffer As Byte(), ByVal InStartIndex As Integer, ByVal InSize As Integer, ByVal OutBuffer As Byte(), ByVal OutStartIndex As Integer, ByRef OutSize As Integer) As Integer
    Function Decrypt(ByVal InBuffer As Byte(), ByRef OutBuffer As Byte(), ByRef OutSize As Integer, ByRef Key As Byte()) As Integer
    Function Decrypt(ByVal InBuffer As Byte(), ByVal InStartIndex As Integer, ByVal InSize As Integer, ByVal OutBuffer As Byte(), ByVal OutStartIndex As Integer, ByVal OutSize As Integer, ByVal Key As Byte()) As Integer
    Function Decrypt(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal InCount As Long = 0) As Integer
    Function Decrypt(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal Key As Byte(), ByVal InCount As Long = 0) As Integer

[Pascal]
    function Decrypt(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer) : integer;
    function Decrypt(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer; Key : pointer; KeySize : integer) : integer;
    function Decrypt(InStream, OutStream : TStream; InCount : Int64 = 0) : integer;
    function Decrypt(InStream, OutStream : TStream; Key : pointer; KeySize : integer; InCount : Int64 = 0) : integer;

[C++]
    int32_t Decrypt(void * InBuffer, int32_t InSize, void * OutBuffer, int32_t &OutSize);
    int32_t Decrypt(void * InBuffer, int32_t InSize, void * OutBuffer, int32_t &OutSize, void * Key, int32_t KeySize);
    int32_t Decrypt(TStream &InStream, TStream &OutStream, int64_t InCount);
    int32_t Decrypt(TStream *InStream, TStream *OutStream, int64_t InCount);
    int32_t Decrypt(TStream &InStream, TStream &OutStream, void * Key, int32_t KeySize, int64_t InCount);
    int32_t Decrypt(TStream *InStream, TStream *OutStream, void * Key, int32_t KeySize, int64_t InCount);

[PHP]
    integer Decrypt(TSBPointer|array of byte|string|NULL $InBuffer, integer $InSize, TSBPointer|array of byte|string|NULL $OutBuffer, integer &$OutSize)
    integer Decrypt(TSBPointer|array of byte|string|NULL $InBuffer, integer $InSize, TSBPointer|array of byte|string|NULL $OutBuffer, integer &$OutSize, TSBPointer|array of byte|string|NULL $Key, integer $KeySize)
    integer Decrypt(TStream $InStream, TStream $OutStream, integer $InCount)
    integer Decrypt(TStream $InStream, TStream $OutStream, TSBPointer|array of byte|string|NULL $Key, integer $KeySize, integer $InCount)

Parameters

  • InBuffer - Pointer to encrypted data in PKCS#7 format
  • InStartIndex - Starting index of the data to be decrypted in the InBuffer.
  • InSize - Size of the input data in bytes
  • OutBuffer - Pointer to buffer where decrypted data should be written
  • OutStartIndex - Starting index of the decrypted data in the OutBuffer.
  • OutSize - Size of the OutBuffer in bytes
  • InStream - Stream to be decrypted.
  • OutStream - Resulting decrypted stream.
  • Key - Symmetric key for data decryption.
  • KeySize - Size of the Key.
  • 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 decryption process was completed successfully, and an error code otherwise.

Possible values:


Description

    Use this method to decrypt an encrypted PKCS#7 message.

See also:     CertStorage     Algorithm     ErrorInfo    

Discuss this help topic in SecureBlackbox Forum