Skip to content

Example for encrypting plain text. #1

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

Closed
richnetdesign opened this issue Sep 9, 2013 · 1 comment
Closed

Example for encrypting plain text. #1

richnetdesign opened this issue Sep 9, 2013 · 1 comment

Comments

@richnetdesign
Copy link

A decryption example is provided. Is encryption possible as well?

@mwielgoszewski
Copy link
Owner

Encryption is possible, as documented by encrypt(). If you were to take the result of:

cookie = padbuster.decrypt(encrypted_cookie, block_size=8, iv=bytearray(8))

and modified cookie, you can simply pass cookie to encrypt():

encrypted_cookie_2 = padbuster.encrypt(cookie, block_size=8, iv=bytearray(8))

Which raises a new issue - the return value documented for encrypt() is incorrect; it should be "Encrypted data."

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

No branches or pull requests

2 participants