timoh6/TCrypto ? reverse-engineered prompt

Reverse engineered prompt

Build me a small PHP 5.3 plus library for secure in memory key value storage.

I want it to store normal PHP values like strings, arrays, and objects, then save and load them through a storage backend, with cookies as the default. It should support optional encryption and authentication, with safe defaults, automatic initialization vectors, and key rotation so old keys can be retired cleanly. Please include a simple way to plug in serialization and optional compression, and make it easy to swap the storage so the payload can also be kept as a plain string if needed.

Also add a tiny command line tool for generating and managing keys, including creating new keys and removing inactive ones. A default key file setup would be great, along with a way to point it at a custom key file.

Keep the API straightforward, something like create the storage, crypto, plugins, and key manager, set values, get values, save, and destroy. If you need current extension details or best practices, look up the latest docs online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab