DCPcrypt Documentation

February 11, 2026 · View on GitHub

Version 2.0.6 | License: MIT


Table of Contents

Getting Started

API Reference

  • Ciphers - TDCP_cipher base class reference
    • Init, InitStr, Burn, Reset
    • Encrypt, Decrypt
    • EncryptStream, DecryptStream
    • PartialEncryptStream, PartialDecryptStream
    • EncryptString, DecryptString
    • OnProgressEvent, CancelByCallingThread
  • Block Ciphers - TDCP_blockcipher reference
    • CipherMode, BlockSize
    • SetIV, GetIV
    • EncryptECB, DecryptECB
    • EncryptCBC, DecryptCBC
    • EncryptCFB8bit, DecryptCFB8bit
    • EncryptCFBblock, DecryptCFBblock
    • EncryptOFB, DecryptOFB
    • EncryptCTR, DecryptCTR
  • Hashes - TDCP_hash base class reference
    • Init, Final, Burn
    • Update, UpdateStream, UpdateStr
    • HashSize, SelfTest

Version History

  • Changelog - All versions from v2.0.4 to v2.0.6

CI/CD

Examples

6 examples covering common cryptographic scenarios:

ExampleTypeDescription
demo_encrypt_stringConsoleSalt+IV string encryption/decryption
demo_file_encryptConsoleFile encryption with progress callback
demo_hash_fileConsoleHash files using all 10 hash algorithms
demo_hash_large_fileConsoleHash large files (>5 GB) with real-time progress (--size=N, --dir=path)
EncryptStringsGUI (LCL)String encryption using EncryptStream
FileEncryptGUI (LCL)File encryption with thread support

Algorithms

20 Ciphers

CipherUnitBlock SizeMax Key Size
Blowfishdcpblowfish.pas64 bits448 bits
Cast128dcpcast128.pas64 bits128 bits
Cast256dcpcast256.pas128 bits256 bits
DESdcpdes.pas64 bits64 bits
3DESdcpdes.pas64 bits192 bits
Icedcpice.pas64 bits64 bits
Thin Icedcpice.pas64 bits64 bits
Ice2dcpice.pas64 bits128 bits
Gostdcpgost.pas64 bits256 bits
IDEAdcpidea.pas64 bits128 bits
MARSdcpmars.pas128 bits1248 bits
Misty1dcpmisty1.pas64 bits128 bits
RC2dcprc2.pas64 bits1024 bits
RC4dcprc4.pasN/A (stream)2048 bits
RC5dcprc5.pas64 bits2048 bits
RC6dcprc6.pas128 bits2048 bits
Rijndael (AES)dcprijndael.pas128 bits256 bits
Serpentdcpserpent.pas128 bits256 bits
TEAdcptea.pas64 bits128 bits
Twofishdcptwofish.pas128 bits256 bits

10 Hashes

HashUnitDigest Size
Havaldcphaval.pas128-256 bits
MD4dcpmd4.pas128 bits
MD5dcpmd5.pas128 bits
RipeMD-128dcpripemd128.pas128 bits
RipeMD-160dcpripemd160.pas160 bits
SHA-1dcpsha1.pas160 bits
SHA-256dcpsha256.pas256 bits
SHA-384dcpsha512.pas384 bits
SHA-512dcpsha512.pas512 bits
Tigerdcptiger.pas192 bits

Test Suite

ProgramTestsCoverage
test_hashes90SelfTest, digest correctness, determinism, Burn
test_ciphers139SelfTest, encrypt/decrypt roundtrip, Burn, properties
test_block_modes28ECB, CBC, CFB8bit, CFBblock, OFB, CTR
test_base6411RFC 4648, binary data, edge cases
test_stream_encrypt14Salt+IV, PartialEncryptStream, OnProgressEvent

Total: 282 tests


Project Structure

dcpcrypt-lazarus/
├── src/
│   ├── Ciphers/            # 17 cipher units (20 algorithms)
│   ├── Hashes/             # 9 hash units (10 algorithms)
│   ├── Docs/               # Original HTML docs and license
│   ├── dcpcrypt2.pas       # Base classes
│   ├── dcpblockciphers.pas # Block cipher modes
│   ├── dcpbase64.pas       # Base64 encoding/decoding
│   ├── dcpconst.pas        # Algorithm ID constants
│   ├── dcpcrypt.lpk        # Runtime package
│   └── dcpcrypt_laz.lpk    # Design-time package
├── tests/                  # Functional test suite
├── examples/               # Console and GUI examples
├── docs/                   # Markdown documentation
├── .github/workflows/      # CI/CD configuration
├── Makefile                # Build, test, clean targets
├── BUILDING.md             # Build instructions
├── CONTRIBUTING.md         # Contribution guidelines
└── TOC.md                  # This file

For support or to report issues, visit the project repository.