Skip to content
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

Cypher text #28

Open
testlorenzospa opened this issue Mar 4, 2024 · 1 comment
Open

Cypher text #28

testlorenzospa opened this issue Mar 4, 2024 · 1 comment

Comments

@testlorenzospa
Copy link

Hello.

I want to encrypt a simple text (not a byte string) in AES256 CBC.
Is it possible?

In a script I use these instruction

cipher = Cipher(algorithm=AES256(cryptoKey), mode=CBC(iv))
encText = cipher.encryptor().update(b"Ciao")

But if I cange the parameter to the update method in a simple text ("Ciao", without sign "b") I get an error from python

TypeError: from_buffer() cannot return the address of a unicode object

What can I do to encrypt a simple text?

Thanks.

@alex
Copy link

alex commented Mar 4, 2024

This is not an issue about the fernet specification.

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