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

Issue with change of implementation of EncryptedType from ‘LargeBinary’ to ‘String’ #722

Open
ArchibaldNoah opened this issue Dec 31, 2023 · 1 comment

Comments

@ArchibaldNoah
Copy link

Good morning

It just happend ...

"The ‘EncryptedType’ class will change implementation from ‘LargeBinary’ to ‘String’ in a future version. Use ‘StringEncryptedType’ to use the ‘String’ implementation."

I am not sure what triggered the migration but it worked fine on the database side.

However, when I am running my program now, I am getting:
"binascii.Error: Invalid base64-encoded string: number of data characters (49) cannot be 1 more than a multiple of 4"

I am using EncryptedType quite a bit.
Typical usage: "last_name = db.Column(StringEncryptedType(Unicode, SA_SECRET_KEY, AesEngine, 'pkcs5'), index=True, unique=False)"

I couldn't find anything on this issue or a hint on the migration in the usual sources.
Any suggestions?

Kind regards,
Jürgen

@ArchibaldNoah
Copy link
Author

Since the last migration I upgraded to SQLAlchemy-Utils==0.41.1 from SQLAlchemy-Utils==0.38.3, SQLAlchemy==2.0.23 from SQLAlchemy==1.4.41.

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

1 participant