EldoS
Navigation
Web site
Support
Table Of Contents

Filter: C#  VB.NET  Pascal  ActiveX  DLL 


TElSymmetricCrypto.Encrypt

TElSymmetricCrypto     See also    


 

Encrypts the data. This topic is under development…

 
 

Declaration

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

[VB.NET]
    Sub Encrypt(ByVal InStream As System.IO.Stream, ByVal OutStream As System.IO.Stream)
    Sub Encrypt(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 Encrypt(ByVal AlgID As Integer, ByVal Key As Byte(), ByVal IV As Byte(), ByVal Mode As TSBSymmetricCryptoMode, ByVal Buffer As Byte()) As Byte()
    Shared Function Encrypt(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 Encrypt(InBuffer : pointer; InSize : integer; OutBuffer : pointer; var OutSize : integer);
    procedure Encrypt(InStream, OutStream : TStream);
    class function Encrypt(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 encrypted.
  • Size - size of the data block to be encrypted.
  • Offset - offset of the data to be encrypted in Buffer.
  • Count - number of bytes to be read from Buffer.
  • IV - specifies Initial Vector.
  • InBuffer - reference to the data to encrypt.
  • InIndex - Offset of the input data in the input array.
  • InSize - Size of input data in bytes.
  • InStream - the stream with the data for encryption.
  • Key - specifies the secret key.
  • Mode - specifies encryption mode.
  • OutBuffer - reference to buffer where encrypted 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 encrypted data will be written.
 
 

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 encrypted data.

 
 

Description

    Use this method when you want to encrypt the data and you have all data for encryption at hand. This method is a shorthand for InitializeEncryption / EncryptUdpdate / FinalizeEncryption sequence of calls. Remember to set Padding mode when using block mode of block ciphers.

 
 

See also:     InitializeEncryption     FinalizeEncryption     EncryptUpdate     Decrypt     Padding    

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