Discuss this help topic in SecureBlackbox Forum

TElMessageDecryptor.Decrypt

TElMessageDecryptor     See also     


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


Decrypts the PKCS#7-compatible message

Declaration

[C#]
    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);
    int Decrypt(System.IO.Stream InStream, System.IO.Stream OutStream, byte[] Key, long InCount);

[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, ByVal 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, ByRef 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) As Integer
    Function Decrypt(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal Key As Byte(), ByVal InCount As Long) 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)

[Java]
    int decrypt(byte[] InBuffer, byte[] OutBuffer, TSBInteger OutSize, byte[] Key);
    int decrypt(byte[] InBuffer, byte[] OutBuffer, TSBInteger OutSize);
    int decrypt(byte[] InBuffer, int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, TSBInteger OutSize);
    int decrypt(TElStream InStream, TElStream OutStream, long InCount);
    int decrypt(byte[] InBuffer, int InStartIndex, int InSize, byte[] OutBuffer, int OutStartIndex, TSBInteger OutSize, byte[] Key);
    int decrypt(TElStream InStream, TElStream OutStream, byte[] Key, long 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