The Fastest, Strongest PHP Security Library

Open-source security with key rotation, dual encryption modes, and optimized performance

Argon2id Hashing AES-256-GCM/CBC SHA3-512 Key Derivation Developer-Specific Keys New: Key Rotation Support

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.

PHP
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;

Maximum Security Features

DaggerX combines industry-leading cryptographic algorithms with key rotation and dual encryption modes to provide unbreakable security for your sensitive data.

Argon2id Password Hashing

Implements the award-winning Argon2id algorithm, optimized for speed (64 MB, 3 iterations) while exceeding OWASP security standards.

SHA3-512 Key Derivation

Uses SHA3-512 for deterministic key derivation, ensuring fast and secure key generation for hashing and encryption.

AES-256-GCM/CBC Encryption

Supports AES-256-GCM for authenticated encryption and AES-256-CBC with HMAC (SHA3-512) for compatibility and integrity.

Developer-Specific Keys

Your encryption keys are never stored on our servers — even DaggerX creators cannot decrypt your data without your key.

Key Rotation Support

New in V3: Rotate developer keys for hashes and encrypted messages to mitigate long-term key compromise risks.

What's New in V3

Supported Languages

PHP Implementation

Install via Composer:

composer require daggerx/password-hasher

Include in your project:

require "vendor/autoload.php"; use DaggerX\DaggerX;

Core Features

  • Argon2id Key Derivation
  • AES-256-GCM/CBC Encryption
  • SHA3-512 Key Derivation
  • HMAC Authentication (CBC)
  • Key Rotation Support
Stable v3.0.0 Released: March 26, 2025

How to Use DaggerX

Hashing a Password

Create a secure hash of a user's password:

$hash = DaggerX::hashPassword("mySecurePassword", "MySecretKey");
echo $hash;
Verifying a Password

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!";
}
Encrypting with AES-256-GCM

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;
Note: Your secret key is never sent to our servers. Keep it safe and secure.
Encrypting with AES-256-CBC

Encrypt sensitive data with AES-256-CBC and HMAC:

$encryptedCBC = DaggerX::encryptMessage(
    "Hello, this is private!", 
    "MySecretKey",
    "aes-256-cbc"
);
echo $encryptedCBC;
Decrypting a Message

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.

Rotating a Hash Key

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!";
Rotating an Encryption Key

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!