Photon Fusion 2.0.3

Public Member Functions | List of all members
IDataEncryption Interface Reference

Interface for classes that manage the encryption/decryption of byte arrays More...

Inherits IDisposable.

Inherited by DataEncryptor.

Public Member Functions

bool ComputeHash (byte *buffer, ref int bufferLength, int capacity)
 Compute the Buffer hash and append it to the buffer itself More...
 
bool DecryptData (byte *buffer, ref int bufferLength, int capacity)
 Decrypt data in place and update it's length. More...
 
bool EncryptData (byte *buffer, ref int bufferLength, int capacity)
 Encrypt data in place and update it's length. More...
 
byte[] GenerateKey ()
 Generate the key used used by the encryption implementation More...
 
void Setup (byte[] key)
 Setup the encryption implementation with the right key More...
 
bool VerifyHash (byte *buffer, ref int bufferLength, int capacity)
 Verify the buffer hash that was appended to the buffer More...
 

Detailed Description

Interface for classes that manage the encryption/decryption of byte arrays

Member Function Documentation

◆ ComputeHash()

bool ComputeHash ( byte *  buffer,
ref int  bufferLength,
int  capacity 
)

Compute the Buffer hash and append it to the buffer itself

Parameters
bufferData to compute the hash
bufferLengthLength of the data to hash
capacityBuffer total capacity
Returns
True if the hash was properly computed, false otherwise

Implemented in DataEncryptor.

◆ DecryptData()

bool DecryptData ( byte *  buffer,
ref int  bufferLength,
int  capacity 
)

Decrypt data in place and update it's length.

Parameters
bufferData to decrypt
bufferLengthLength of the data to decrypt
capacityBuffer total capacity
Returns
True if the decryption was completed, false otherwise

Implemented in DataEncryptor.

◆ EncryptData()

bool EncryptData ( byte *  buffer,
ref int  bufferLength,
int  capacity 
)

Encrypt data in place and update it's length.

Parameters
bufferData to encrypt
bufferLengthLength of the data to encrypt
capacityBuffer total capacity
Returns
True if the encryption was completed, false otherwise

Implemented in DataEncryptor.

◆ GenerateKey()

byte [] GenerateKey ( )

Generate the key used used by the encryption implementation

Returns
Key used to setup the encryption implementation

Implemented in DataEncryptor.

◆ Setup()

void Setup ( byte[]  key)

Setup the encryption implementation with the right key

Implemented in DataEncryptor.

◆ VerifyHash()

bool VerifyHash ( byte *  buffer,
ref int  bufferLength,
int  capacity 
)

Verify the buffer hash that was appended to the buffer

Parameters
bufferBuffer to check the hash
bufferLengthLength of the data to hash
capacityBuffer total capacity
Returns
True if the hash was properly verified, false otherwise

Implemented in DataEncryptor.