SimpleEncryption icon indicating copy to clipboard operation
SimpleEncryption copied to clipboard

Simple Encryption for PHP

Results 5 SimpleEncryption issues
Sort by recently updated
recently updated
newest added

Consider generating a random salt every time you encrypt data. That way, you can use HKDF to derive a new cipherkey, mackey and iv from the master key. Then, just...

Currently, the produced encrypted output includes only the IV, MAC and Ciphertext. Consider adding a leading byte (packed) which indicates an algorithm version indicator. This will allow upgrades to the...

I'm pretty confident in the code so far, but obviously, as a cryptographic library it needs more eyeballs. Two notable pieces of code that could be a concern: - [HKDF...

help wanted

I **strongly** recommend that you make the class stateless rather than statefull as you have it now. Basically, don't pass in input to the constructor, but instead have discrete `encrypt($text)`...

Key rotation is a significant concern that no PHP library really deals with. Consider adding support for key rotation (possibly with a "key identifier"). This is something I was playing...