Discuss this help topic in SecureBlackbox Forum

TElSymmetricCrypto.Decrypt

TElSymmetricCrypto     See also     


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


Decrypts the data.

Declaration

[C#/Java]
    void Decrypt(System.IO.Stream InStream, System.IO.Stream OutStream, int InCount);
    void Decrypt(byte[] InBuffer, int InIndex, int InSize, ref byte[] OutBuffer, int OutIndex, ref int OutSize);
    static byte[] Decrypt(int AlgID, byte[] Key, byte[] IV, TSBSymmetricCryptoMode Mode, byte[] Buffer);
    static byte[] Decrypt(int AlgID, byte[] Key, byte[] IV, TSBSymmetricCryptoMode Mode, byte[] Buffer, int Offset, int Count);

[VB.NET]
    Sub Decrypt(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream, ByVal InCount As Integer)
    Sub Decrypt(ByVal InBuffer As Byte(), ByVal InIndex As Integer, ByVal InSize As Integer, ByRef OutBuffer As Byte(), ByVal OutIndex As Integer, ByRef OutSize As Integer)
    Shared Function Decrypt(ByVal AlgID As Integer, ByVal Key As Byte(), ByVal IV As Byte(), ByVal Mode As TSBSymmetricCryptoMode, ByVal Buffer As Byte()) As Byte()
    Shared Function Decrypt(ByVal AlgID As Integer, ByVal Key As Byte(), ByVal IV As Byte(), ByVal Mode As TSBSymmetricCryptoMode, ByVal Buffer As Byte(), ByVal Offset As Integer, ByVal Count As Integer) As Byte()

[Pascal]
    procedure Decrypt(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer);
    procedure Decrypt(InStream, OutStream : TStream; InCount : integer = 0);
    class function Decrypt(AlgID : integer; const Key, IV : ByteArray; Mode : TSBSymmetricCryptoMode; Buffer : Pointer; Size : integer) : ByteArray;

[C++]
    void Decrypt(void * InBuffer, int32_t InSize, void * OutBuffer, int32_t &OutSize);
    void Decrypt(TStream &InStream, TStream &OutStream, int32_t InCount);
    void Decrypt(TStream *InStream, TStream *OutStream, int32_t InCount);
    static void Decrypt(int32_t AlgID, const std::vector<uint8_t> &Key, const std::vector<uint8_t> &IV, TSBSymmetricCryptoMode Mode, void * Buffer, int32_t Size, std::vector<uint8_t> &OutResult);

[PHP]
    void Decrypt(TSBPointer|array of byte|string|NULL $InBuffer, integer $InSize, TSBPointer|array of byte|string|NULL $OutBuffer, integer &$OutSize)
    void Decrypt(TStream $InStream, TStream $OutStream, integer $InCount)
    string Decrypt(integer $AlgID, array of byte|string|NULL $Key, array of byte|string|NULL $IV, integer $Mode, TSBPointer|array of byte|string|NULL $Buffer, integer $Size)

Parameters

  • AlgID - specifies algorithm identifier.
  • Buffer - buffer containing the data to be decrypted.
  • Size - size of the data block to be decrypted.
  • Offset - offset of the data to be decrypted in Buffer.
  • Count - number of bytes to be read from Buffer.
  • IV - specifies Initial Vector.
  • InBuffer - reference to the data to decrypt.
  • InIndex - offset of the input data in the input array.
  • InSize - size of input data in bytes.
  • InStream - the stream with the data for decryption.
  • InCount - number of bytes to be read from InStream.
  • Key - specifies the secret key.
  • Mode - specifies encryption mode.
  • OutBuffer - reference to buffer where decrypted data should be stored.
  • OutIndex - Offset in the output array, starting from which the data is written.
  • OutSize - Size of available space in OutBuffer in bytes.
  • OutStream - the stream to which the decrypted data will be written.

Algorithm identifier values:


Mode values:

Return value

    Returns the decrypted data.

Description

    Use this method when you want to decrypt the data and you have all data for decryption at hand. This method is a shorthand for InitializeDecryption / DecryptUdpdate / FinalizeDecryption sequence of calls.

See also:     InitializeDecryption     FinalizeDecryption     DecryptUpdate     Encrypt    

Discuss this help topic in SecureBlackbox Forum