EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElSymmetricCrypto.Decrypt

TElSymmetricCrypto     See also    


 

Decrypts the data.

 
 

Declaration

[C#]
    void Decrypt(System.IO.Stream InStream, System.IO.Stream OutStream, int InCount /* = 0 */);
    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 = 0)
    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;

[VB6]
    not implemented;

[ActiveX]
    not implemented;

[DLL]
    not implemented;
 
 

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:

Definition Value Description
SB_ALGORITHM_CNT_RC4 0x7001 Specifies RC4 algorithm
SB_ALGORITHM_CNT_DES 0x7002 Specifies DES algorithm
SB_ALGORITHM_CNT_3DES 0x7003 Specifies 3DES algorithm
SB_ALGORITHM_CNT_RC2 0x7004 Specifies RC2 algorithm
SB_ALGORITHM_CNT_AES128 0x7005 Specifies AES algorithm with a 128-bit key
SB_ALGORITHM_CNT_AES192 0x7006 Specifies AES algorithm with a 192-bit key
SB_ALGORITHM_CNT_AES256 0x7007 Specifies AES algorithm with a 256-bit key
SB_ALGORITHM_CNT_IDENTITY 0x700A Specifies NO encryption. The data is returned as original.
SB_ALGORITHM_CNT_BLOWFISH 0x7010 Specifies Blowfish algorithm
SB_ALGORITHM_CNT_TWOFISH 0x7011 Specifies Twofish algorithm
SB_ALGORITHM_CNT_CAMELLIA 0x7012 Specifies Camellia algorithm
SB_ALGORITHM_CNT_CAST128 0x7013 Specifies CAST algorithm
SB_ALGORITHM_CNT_IDEA 0x7014 Specifies IDEA algorithm
SB_ALGORITHM_CNT_SERPENT 0x7015 Specifies Serpent algorithm
SB_ALGORITHM_CNT_TWOFISH128 0x7016 Specifies Twofish algorithm with a 128-bit key
SB_ALGORITHM_CNT_TWOFISH192 0x7017 Specifies Twofish algorithm with a 192-bit key
SB_ALGORITHM_CNT_TWOFISH256 0x7018 Specifies Twofish algorithm with a 256-bit key
SB_ALGORITHM_CNT_CAMELLIA128 0x7019 Specifies Camellia algorithm with a 128-bit key
SB_ALGORITHM_CNT_CAMELLIA192 0x701A Specifies Camellia algorithm with a 192-bit key
SB_ALGORITHM_CNT_CAMELLIA256 0x701B Specifies Camellia algorithm with a 256-bit key
SB_ALGORITHM_CNT_SERPENT128 0x701C Specifies Serpent algorithm with a 128-bit key
SB_ALGORITHM_CNT_SERPENT192 0x701D Specifies Serpent algorithm with a 192-bit key
SB_ALGORITHM_CNT_SERPENT256 0x701E Specifies Serpent algorithm with a 256-bit key
SB_ALGORITHM_CNT_SEED 0x7020 Specifies SEED algorithm
SB_ALGORITHM_CNT_RABBIT 0x7021 Specifies Rabbit algorithm
SB_ALGORITHM_CNT_SYMMETRIC 0x7022 Specifies … algorithm
SB_ALGORITHM_CNT_GOST_28147_1989 0x7023 Specifies … algorithm
Declared in
[.NET] [Pascal]
Namespace: SBConstants
Assembly: SecureBlackbox
Unit: SBConstants

Mode values:

[.NET] [Pascal] Description
cmDefault Default encryption mode for block ciphers. Currently CBC is default mode. For stream ciphers Default is the only mode.
cmECB ECB encryption mode
cmCBC CBC encryption mode
cmCTR CTR encryption mode
cmCFB8 CFB8 encryption mode
Declared in
[.NET] [Pascal]
Namespace: SBSymmetricCrypto
Assembly: SecureBlackbox
Unit: SBSymmetricCrypto

 
 

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    

 
Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2012, EldoS Corporation