New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
memory leak using cipher: #6
Comments
|
thanks, I will fix it in some days. |
|
cipher encrypt/decrypt use EVP_CIPHER_CTX in stack, not in heap, it should be call EVP_CIPHER_CTX_cleanup to free ctx memory. Thanks! |
|
Great work man! Process now consistently uses 1.9M of RAM! Thanks ALOT :) |
|
:). Here a advice, if you want to encrypt some important information, such like a password, you should add salt,to get diff cipher text by same plain password.
local openssl = require'openssl' c = openssl.get_cipher('bf') --openssl.random_bytes(number length [, boolean strong=false]) salt = openssl.random_bytes(8, true) ---evp_cipher:init(bool enc, [, string key [,string iv [,engine engimp]]]) => cipher_ctx cc=c:init(true,key,iv) |
The following code leaks memory really badly (2G per in 7 seconds)
Lua environment:
Latest lua-openssl master
The text was updated successfully, but these errors were encountered: