Open-source security with key rotation, dual encryption modes, and optimized performance
DaggerX V3.0.0 delivers military-grade security with key rotation, AES-256-GCM and CBC encryption, and optimized Argon2id hashing—making it the most feared PHP security library for attackers.
use DaggerX\DaggerX; // Encrypt sensitive data with AES-256-GCM $encrypted = DaggerX::encryptMessage( "Hello, this is private!", "MySecretKey", "aes-256-gcm", "user_id:12345" ); // No one can access this without your key echo $encrypted;
DaggerX combines industry-leading cryptographic algorithms with key rotation and dual encryption modes to provide unbreakable security for your sensitive data.
Implements the award-winning Argon2id algorithm, optimized for speed (64 MB, 3 iterations) while exceeding OWASP security standards.
Uses SHA3-512 for deterministic key derivation, ensuring fast and secure key generation for hashing and encryption.
Supports AES-256-GCM for authenticated encryption and AES-256-CBC with HMAC (SHA3-512) for compatibility and integrity.
Your encryption keys are never stored on our servers — even DaggerX creators cannot decrypt your data without your key.
New in V3: Rotate developer keys for hashes and encrypted messages to mitigate long-term key compromise risks.
rotateHashKey()
and rotateEncryptionKey()
.Install via Composer:
Include in your project:
Create a secure hash of a user's password:
$hash = DaggerX::hashPassword("mySecurePassword", "MySecretKey"); echo $hash;
Verify a user's password against a stored hash:
$isValid = DaggerX::verifyPassword("mySecurePassword", $hash, "MySecretKey"); if ($isValid) { echo "Password is correct!"; } else { echo "Invalid password!"; }
Encrypt sensitive data with AES-256-GCM and AAD:
$encrypted = DaggerX::encryptMessage( "Hello, this is private!", "MySecretKey", "aes-256-gcm", "user_id:12345" ); echo $encrypted;
Encrypt sensitive data with AES-256-CBC and HMAC:
$encryptedCBC = DaggerX::encryptMessage( "Hello, this is private!", "MySecretKey", "aes-256-cbc" ); echo $encryptedCBC;
Decrypt data with your secret key:
$decrypted = DaggerX::decryptMessage($encrypted, "MySecretKey", "user_id:12345"); echo $decrypted; // Output: Hello, this is private! $decryptedCBC = DaggerX::decryptMessage($encryptedCBC, "MySecretKey"); echo $decryptedCBC; // Output: Hello, this is private!
Without the correct key, no one can access the original data—not even us.
Rotate the developer key for a password hash:
$newHash = DaggerX::rotateHashKey( "mySecurePassword", $hash, "MySecretKey", "NewSecretKey" ); echo $newHash; // Verify with the new key $isValid = DaggerX::verifyPassword("mySecurePassword", $newHash, "NewSecretKey"); echo $isValid ? "Password verified with new key!" : "Verification failed!";
Rotate the developer key for an encrypted message:
$newEncrypted = DaggerX::rotateEncryptionKey( $encrypted, "MySecretKey", "NewSecretKey", "user_id:12345", "aes-256-gcm" ); echo $newEncrypted; // Decrypt with the new key $decrypted = DaggerX::decryptMessage($newEncrypted, "NewSecretKey", "user_id:12345"); echo $decrypted; // Output: Hello, this is private!
DaggerX is free and open-source. If you find it useful, consider donating to support future development!
Every donation helps keep DaggerX the fastest, strongest, and most feared PHP security library for everyone.