Photon Fusion
2.1.1
Responsible for encrypting and decrypting data buffers. More...
Inherits IDataEncryption.
Public Member Functions | |||||||
| bool | ComputeHash (byte *buffer, ref int bufferLength, int capacity) | ||||||
Compute the Buffer hash and append it to the buffer itself.
| |||||||
| bool | DecryptData (byte *buffer, ref int bufferLength, int capacity) | ||||||
Decrypt data in place and update it's length.
| |||||||
| void | Dispose () | ||||||
| Dispose of the DataEncryptor. | |||||||
| bool | EncryptData (byte *buffer, ref int bufferLength, int capacity) | ||||||
| Encrypts the data in the provided buffer. | |||||||
| byte[] | GenerateKey () | ||||||
Generate the key used used by the encryption implementation.
| |||||||
| void | Setup (byte[] key) | ||||||
| Setup the encryption implementation with the right key. | |||||||
| bool | ValidateKey (byte[] key) | ||||||
Check if the given key is valid.
| |||||||
| bool | VerifyHash (byte *buffer, ref int bufferLength, int capacity) | ||||||
Verify the buffer hash that was appended to the buffer.
| |||||||
Responsible for encrypting and decrypting data buffers.
| bool EncryptData | ( | byte * | buffer, |
| ref int | bufferLength, | ||
| int | capacity ) |
Encrypts the data in the provided buffer.
| buffer | The buffer containing the data to be encrypted. |
| bufferLength | The length of the data in the buffer. |
| capacity | The total capacity of the buffer. |
| InvalidOperationException | Thrown when the encryption provider is not initialized. |
| ArgumentException | Thrown when the original buffer cannot hold the encrypted data. |
Implements IDataEncryption.