Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Encrypter Bundle Laravel Package

manojx/encrypter-bundle

manojx/encrypter-bundle is a lightweight encryption wrapper for Laravel and PHP applications, bundling encrypt/decrypt helpers and a simple service for protecting sensitive strings consistently across projects.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — Poor, and the mismatch is the headline finding. Despite being routed as a Laravel/PHP package, the description explicitly targets Symfony ("simplifies adding encryption features to your Symfony applications," "Encrypter Bundle"). A Symfony bundle is a Symfony\Component\HttpKernel\Bundle\Bundle subclass plus a DI Extension and services.yaml wiring. Laravel does not load bundles; it uses service providers over its own container. There is no drop-in path — adoption means either porting the bundle or running it alongside a Symfony kernel we don't have. Worse, on the Laravel side the capability is already native: Illuminate\Encryption\Encrypter and the Crypt facade provide AES-256-CBC with encrypt-then-MAC and key rotation via previous_keys. This package, at best, re-implements a subset of framework core.

Integration feasibility — Low without a fork. The package is a single release (2024-10-05), zero stars, zero dependents, and a NOASSERTION license — meaning we cannot confirm redistribution or derivative-work rights. For a component that sits directly in the confidentiality path, unverifiable licensing is a compliance stop, not a nit. Packagist presence and autoload validity are unconfirmed.

Technical risk — High and concentrated:

  • CBC without authentication. The description names AES-256-CBC and says nothing about a MAC or AEAD. Unauthenticated CBC is malleable and exposes padding-oracle behavior if decryption errors are observable. This is the single largest risk and the first thing to verify.
  • Supply chain. Bus factor of one, no security disclosure policy, no audit, no dependents to crowd-source bug discovery. An encryption library is the highest-consequence place to accept unvetted code.
  • Key management undefined. No stated story for key generation, storage, rotation, or envelope encryption. That is where real encryption failures occur, not in the cipher call.

Key questions

  1. Does the package perform encrypt-then-MAC or use an AEAD mode, or is it raw CBC? Is the IV CSPRNG-derived per message and prepended to the payload?
  2. Does a Bundle class actually exist, or is this a mislabeled plain PHP library? What are the PHP and Symfony version constraints?
  3. How is the key sourced and rotated? Is there multi-key/fallback support for rotation windows?
  4. Is the license resolvable (MIT/Apache-2.0) from the repo, or genuinely unasserted?
  5. Is there a test suite, and does it cover tamper detection and malformed-ciphertext handling?
  6. Does it maintain any Laravel adapter or service provider at all?

Integration Approach

Stack fit — If our stack is Laravel (the assumed context), fit is effectively zero and the correct answer is Crypt::encryptString() / decryptString() with APP_KEY managed by our secrets store. If any team is genuinely on Symfony, fit improves to moderate but still competes with symfony/security primitives and direct sodium_crypto_secretbox. Either way this package is not the shortest path.

Migration path — There is no migration to perform; there is nothing in production using it. If we were to adopt, the only defensible path is: fork → audit → vendor (Composer VCS/path repo) → wrap behind an internal EncryptionService interface → port the DI wiring to a Laravel service provider or Symfony extension we control. That is a multi-sprint effort to obtain functionality we already have.

Compatibility — Unknown until verified against our PHP version, Laravel/Symfony version, and config:cache. Note the Laravel-specific trap: any third-party key read via env() outside a config/ file silently breaks under php artisan config:cache, and decryption ordering during boot can fail if the key itself is encrypted. These are standard integration hazards for third-party crypto packages.

Sequencing — (1) Confirm the actual requirement: confidentiality at rest? field-level PII encryption? envelope encryption with KMS? (2) Baseline against native Crypt and confirm the gap. (3) If a gap is real, evaluate managed KMS or libsodium before any third-party package. (4) Only then consider this package, forked and audited. Do not run a pilot on this package to "learn" — the learning cost exceeds the build cost.

Operational Impact

Maintenance — Assume we own it. One maintainer, one release, no visible cadence or triage. Any CVE or PHP-version break becomes our patch. Budget a permanent fork-maintenance line item if adopted.

Support — No commercial support, no SLA, no community to escalate to. Internal security review and incident response would be entirely on us — for a cryptographic component, that is the wrong trade.

Scaling — Performance is a non-issue: AES-256-CBC is fast and the per-call cost is irrelevant at typical field-encryption volumes. The scaling constraint is key management — how many keys, what rotation window, how re-encryption of existing rows is backfilled, and whether large encrypted columns blow up storage (base64 + IV + MAC overhead ~33%+). Those are unaddressed by the package and are the real design work.

Failure modes — Padding-oracle decryption errors surfaced to users or logs; IV reuse if generation is weak; silent truncation or encoding corruption on binary payloads through JSON/DB layers; total data loss on APP_KEY rotation without multi-key fallback; config:cache and env-order failures at boot. Each of these is a data-availability or confidentiality incident, and none is documented as handled.

Ramp-up — Trivial to use, expensive to trust. The API surface is likely two calls, so engineer ramp-up is hours; the assurance work — audit, license clearance, key-management design, rotation testing — is weeks. The asymmetric cost is the whole argument.

Recommendation — Do not adopt. Score of 0.1 with 0 dependents and an unresolved license is consistent with our read. Close the evaluation and route the underlying requirement to native Crypt plus a KMS-backed key strategy; revisit only if a concrete capability gap survives that comparison.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator