Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Padding control for Crypto (v2) #2014

Closed
wants to merge 5 commits into from
Closed

Padding control for Crypto (v2) #2014

wants to merge 5 commits into from

Conversation

KiNgMaR
Copy link

@KiNgMaR KiNgMaR commented Nov 4, 2011

This is basically an implementation of what has been requested in joyent#361. It includes docs and a test suite.

Regarding the public API:
I originally was going to use an argument bool auto_padding to cipher.final and decipher.final, however that is not possible in decipher.final, for EVP_CipherUpdate must already know about the padding situation when decrypting (setting it before calling EVP_CipherFinalEx would be enough when encrypting).
That's why I added new methods setAutoPadding([bool enable = true]) to Cipher and Decipher.

Looking forward to reading your comments.

@piscisaureus
Copy link

I rebased and changed it a little bit. It's landed in 0ca3018. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants