Discuss this help topic in SecureBlackbox Forum

TElSymmetricCrypto.Decrypt

TElSymmetricCrypto     See also     


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


Decrypts the data.

Declaration

[C#]
    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); overload;
    procedure Decrypt(InStream, OutStream : TStream; InCount : integer = 0); overload;
    class function Decrypt(AlgID : integer; const Key, IV : ByteArray; Mode : TSBSymmetricCryptoMode; Buffer : Pointer; Size : integer) : ByteArray; overload;

[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)

[Java]
    int decrypt(byte[] InBuffer, int InIndex, int InSize, byte[][] OutBuffer, int OutIndex, int OutSize);
    static byte[] decrypt(TElSymmetricCrypto> this, int AlgID, byte[] Key, byte[] IV, TSBSymmetricCryptoMode Mode, byte[] Buffer);
    static byte[] decrypt(TElSymmetricCrypto> this, int AlgID, byte[] Key, byte[] IV, TSBSymmetricCryptoMode Mode, byte[] Buffer, int Offset, int Count);
    void decrypt(TElStream InStream, TElStream OutStream, int InCount);
    void decrypt(InputStream InStream, OutputStream OutStream, int InCount);

Parameters

  • AlgID - specifies the encryption algorithm.
  • Buffer - buffer with encrypted data.
  • Size - the size of the data block (in Buffer) to be decrypted.
  • Offset - the offset of the encrypted data block in Buffer.
  • Count - the number of bytes to be read from Buffer.
  • IV - specifies the Initial Vector.
  • InBuffer - buffer with encrypted data.
  • InIndex - the offset of the encrypted data block in InBuffer.
  • InSize - the size of the data block (in InBuffer) to be decrypted.
  • InStream - stream with encrypted data.
  • InCount - number of bytes to be read from InStream.
  • Key - the secret key.
  • Mode - specifies the encryption mode.
  • OutBuffer - buffer where the decrypted data should be stored.
  • OutIndex - the fffset in the OutBuffer, starting from which the data is written.
  • OutSize - the amount of free space in OutBuffer, in bytes.
  • OutStream - stream where 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