TOlfCryptDecrypt Class
Definition
Simple class to crypt and decrypt buffers.
type TOlfCryptDecrypt = class(TObject)
- Inheritance
-
TObjectTOlfCryptDecrypt
Remarks
This unit contains very simple cryptographic algorithms. DON't USE THEM FOR SENSIBLE DATAS !!! Check those projects if you need a more robust algorithm : - Delphi Encryption Compendium https://github.com/MHumm/DelphiEncryptionCompendium - TMS Cryptographic Pack https://www.tmssoftware.com/site/tmscrypto.asp
Constructors
| Create |
Create an instance of TOlfCryptDecrypt class |
| Create(TByteDynArray) |
Create an instance of TOlfCryptDecrypt class and fill its key buffer as bytes |
| Create(TIntegerDynArray) |
Create an instance of TOlfCryptDecrypt class and fill its key buffer as integers |
Properties
| ByteKeys |
buffer of bytes used as a key by Crypt/Decrypt functions |
| IntegerKeys |
buffer of integers used as a key by Crypt/Decrypt functions |
Methods
| Crypt(TStream) |
DEPRECATED - internally use XORCrypt |
| Crypt(TStream, TByteDynArray) |
DEPRECATED - internally use XORCrypt |
| Decrypt(TStream) |
DEPRECATED - internally use XORDecrypt |
| Decrypt(TStream, TByteDynArray) |
DEPRECATED - internally use XORDecrypt |
| GenIDBKey(Word) | |
| GenShiftKey(Word) | |
| GenSwapKey |
Export a key as an array of 256 random bytes |
| GenXORKey(Word) |
Export a key as an array of random bytes |
| IDBCrypt(TStream) | |
| IDBCrypt(TStream, TIntegerDynArray) | |
| IDBDecrypt(TStream) | |
| IDBDecrypt(TStream, TIntegerDynArray) | |
| SetByteKeys(TByteDynArray) | |
| SetIntegerKeys(TIntegerDynArray) | |
| ShiftCrypt(TStream) | |
| ShiftCrypt(TStream, TIntegerDynArray) | |
| ShiftDecrypt(TStream) | |
| ShiftDecrypt(TStream, TIntegerDynArray) | |
| SwapCrypt(TStream) |
exchange bytes between a buffer to crypt and the property key |
| SwapCrypt(TStream, TByteDynArray) |
exchange bytes between a buffer to crypt and the key parameter |
| SwapDecrypt(TStream) |
exchange bytes between a buffer to uncrypt and the property key |
| SwapDecrypt(TStream, TByteDynArray) |
exchange bytes between a buffer to uncrypt and the key parameter |
| XORCrypt(TStream) |
use XOR operand to crypt a buffer with the keys buffer property |
| XORCrypt(TStream, TByteDynArray) |
use XOR operand to crypt a buffer with a keys buffer |
| XORDecrypt(TStream) |
use XOR operand to decrypt a buffer with the keys buffer property |
| XORDecrypt(TStream, TByteDynArray) |
use XOR operand to decrypt a buffer with a keys buffer |