Skip to content

Cypher text #28

@testlorenzospa

Description

@testlorenzospa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions