这是一个很棒的php类,可以在php中进行安全的双向加密.我在一个项目中使用它,需要对它的方法进行数千次调用,
我想将它转换为一个完整的静态类及其所有方法,以提高性能并避免在每次新方法调用时使用新实例
/**
* A class to handle secure encryption and decryption of arbitrary data
*
* Note that this is not just straight encryption. It also has a few other
* features in it to make the encrypted data far more secure. Note that any
* other implementations used to decrypt data will have to do the same exact
* operations.
*
* Security Benefits:
*
* - Uses Key stretching
* - Hides the Initialization Vector
* - …Run Code Online (Sandbox Code Playgroud)