nmure/encryptor
nmure/encryptor is a lightweight Laravel/PHP package for encrypting and decrypting sensitive data through a simple API, helping you secure strings and application values without adding complexity to your codebase.
What it is. A single-purpose, thin wrapper over PHP's openssl_* functions for symmetric string encryption/decryption. MIT licensed, ~7 stars, zero dependents, last release 2017-12-02. That release date is the dominant fact in this assessment: it predates PHP 7.2 (mcrypt removal), PHP 8.0 (removal of openssl_free_key, stricter type handling), and the broad industry shift to AEAD-by-default.
Architecture fit. Poor as a strategic dependency, acceptable as a narrow utility. The package offers no key management, no envelope encryption, no versioned ciphertext format, and (almost certainly) no key rotation story. Any architecture that must satisfy SOC2/PCI/GDPR-adjacent controls needs ciphertext to be self-describing (algorithm + IV + tag + key id) so keys can be rotated without a flag day. A 2017-era API surface typically does not carry that metadata. Unless we are only encrypting transient, low-value, short-lived data inside one service, this is not an encryption architecture — it is a helper function.
Integration feasibility. Mechanically trivial. The API is small (likely encrypt/decrypt with a key and optional cipher), it is Composer-installable, and a competent PHP engineer can wrap it in an interface in under half a day. The risk is not effort; it is what sits underneath the trivial API.
Technical risk — the items I would block on until verified in source:
openssl_encrypt was available in 2017, but wrappers of this vintage commonly default to AES-128-CBC.md5/sha1 or used as a raw passphrase rather than a KDF (HKDF/sodium_crypto_pwhash), passphrase strength becomes the real key.OPENSSL_RAW_DATA flags — a classic source of silent truncation and null-byte handling bugs.composer audit, Snyk, and Dependabot will flag an 8-year-stale package, creating friction with security review on every release.Key questions to answer before committing (timebox: 1 day reading source + a 2-hour spike):
hash_equals)?composer.json, and does it actually pass on PHP 8.2/8.3?Stack fit. Fine for any PHP 7.4+/8.x service — it is framework-agnostic and does not touch Laravel internals, so it will not fight the container or config system. It slots in as a low-level string utility. It does not belong in a Laravel service provider as a first-class encryption driver, and it should never shadow Illuminate\Encryption\Encrypter (which, notably, already provides AES-256-CBC with HMAC authentication and key rotation via APP_PREVIOUS_KEYS).
Recommended decision. Do not adopt as net-new infrastructure. Ranked alternatives:
Crypt facade — AEAD-ish (CBC + HMAC), maintained, supports key rotation. Zero new dependency.ext-sodium / sodium_crypto_secretbox — bundled since PHP 7.2, misuse-resistant, no package at all.defuse/php-encryption or paragonie/halite — if we need a standalone library with an audited envelope format and active maintenance.Migration path (if legacy ciphertext exists, which is the realistic reason this package surfaces):
SecretBox::seal/open) and implement NmureEncryptorAdapter behind it. No application code imports the package directly. This makes replacement a one-file change.v2:) so reader logic can branch by format without guessing.Sequencing. Interface + adapter (½ day) → source audit and go/no-go (1 day) → v2 writer + dual reader (1–2 days) → backfill job and dry run in staging (2–3 days) → production rollout behind a config flag → decommission. Roughly one engineer-week, dominated by the backfill, not the library swap.
Compatibility note. Pin an exact version in composer.json (there will be no ^ update risk because there are no updates) and add an explicit composer.json "abandoned"-style comment or a SECURITY.md note so a future maintainer does not read the dependency as a deliberate choice.
Maintenance. Effectively zero upstream motion — which is not the same as zero cost. It converts a maintenance cost into an ownership cost: we are now the de facto maintainer of a vendored fork. Budget a fork in the org namespace if the audit surfaces any defect, because a PR to an 8-year-dormant repo is not a plan.
Support. No vendor, no SLA, no issue triage. Internal support burden is low in volume (the API is tiny) but high in expertise — the person who can safely debug it is a security-literate engineer, not a generalist. That is a scarce-resource dependency.
Scaling. Cryptographically, symmetric per-record encryption at these key sizes scales fine; throughput is dominated by OpenSSL, not by the wrapper. Operationally, the scaling problem is key rotation: without a ciphertext envelope carrying a key identifier, rotating keys means a full re-encrypt of all data or maintaining per-key code paths. That is the cost that grows non-linearly with data volume and retention.
Failure modes to monitor:
openssl_* signatures) — caught only by an integration test, so add one that round-trips and one that tampers with a byte and expects failure.Ramp-up. Very low for happy-path use (hours). Steep for safe use — an engineer must know enough crypto to recognize whether the defaults are sound, which is precisely the knowledge that would lead them to pick a different library. That asymmetry is the core argument against adoption: the package is easy to use and hard to use correctly, and it gives no signal about which one you are doing.
Bottom line. Score and staleness are consistent with the evidence: an unaudited, unmaintained, unvalidated single-author wrapper around primitives PHP already ships natively. Recommend no new adoption; permit it only as a temporary decryption adapter inside an isolated interface with a scheduled retirement, and treat any pre-existing production use as a finding to remediate this quarter.
How can I help you explore Laravel packages today?