laminas/laminas-crypt
Laminas Crypt offers cryptographic tools for PHP applications: symmetric encryption, block ciphers, secure password hashing, key derivation, and public-key/hybrid encryption helpers. It provides a consistent, framework-agnostic API within the Laminas ecosystem.
Hash facade (bcrypt/Argon2id), Illuminate\Encryption\Encrypter (AES-256-CBC/GCM with HMAC authentication), and signed URLs cover password hashing and authenticated symmetric encryption out of the box. The realistic decision this package informs is "do we port legacy crypto code or rewrite it on native primitives?" — and the answer is almost always rewrite.Laminas\Crypt\BlockCipher or password hashes produced by Laminas\Crypt\Password\Bcrypt, this package tells you whether a read-time compatibility shim is feasible before you migrate users to Laravel's Hash facade (rehash-on-login is the standard path).phpseclib, libsodium sealed boxes, or paragonie/halite — not an archived package.Adopt only under narrow, time-boxed conditions:
Look elsewhere when:
password_hash() / password_verify() with PASSWORD_ARGON2ID. There is no reason to add a dependency for this.Crypt::encryptString() / encrypt(). Key rotation via APP_PREVIOUS_KEYS is already handled.phpseclib/phpseclib (actively maintained, widely audited) or libsodium via the sodium extension.defuse/php-encryption or paragonie/halite.To executives: We evaluated this library and recommend against adopting it. It is archived, has minimal community traction, and duplicates cryptography that Laravel and PHP already provide and maintain. Adding it would increase our attack surface and create a compliance question without adding capability. If it is already in our codebase, we should budget a small, contained removal rather than an expansion.
To engineering: This is a Laravel-agnostic Laminas package offering password hashing adapters, authenticated block cipher encryption, and RSA/hybrid helpers. Roughly 90% of that surface is redundant with Hash and Encrypter. The ~10% that isn't — public-key envelopes — is better served by phpseclib or sodium. Because the repo is archived, there is no path to a security patch; treat any existing usage as technical debt.
Recommended path:
Hash with rehash-on-login — zero user friction.Crypt behind a migration script; dual-read during the transition.phpseclib or sodium and document the key management story.Bottom line: Do not adopt. Contain and retire. The package is competent but redundant, and its archived status makes it unsuitable for anything that touches credentials or production data.
How can I help you explore Laravel packages today?