burakdalyanda/cipher-weave — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small Laravel package called CipherWeave that makes it easy to protect API traffic by automatically decrypting incoming requests and encrypting outgoing responses through middleware.

It should work with modern Laravel versions and PHP 8.2 or newer. I want developers to be able to install it with Composer, publish a config file, run an Artisan command that generates an encryption key and saves it to the env file, then add one middleware alias to protect selected routes.

Please include a simple facade so someone can manually encrypt and decrypt values too, plus support using the service through dependency injection. It should allow a default encryption key from config or env, and also allow a custom key to be passed into the middleware for specific routes.

Add clear README instructions, sensible tests, and keep the code clean enough for a Laravel package that could be published publicly. Look up current Laravel package docs online if you need to.

Want more depth? Deep Reverse