-
Notifications
You must be signed in to change notification settings - Fork 29
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
Decrypting issue #12
Comments
can I see the value of: |
I'm getting bit by the same error. Here's a reproducible test case: On python:
Then: >>> from cryptography.fernet import Fernet
>>> k = Fernet.generate_key()
>>> print(k)
b'LvxMTvhAEXNB2o66GnAOPO6J63lL9KvB-WNDeyEoNGA='
>>> print(Fernet(k).encrypt(b'Will not break. Will not break. Oops, it broke!'))
b'gAAAAABZoH7ygX3JB6eZgocWIERBUPtNO0B2LJaRNXKtWEledr0LkvHpY2nZjPBDliJj__zDNrX2Oxhr67nXE-dsmRfAvrUtS4QKkHAmbUub8DMPQ6p2P7XDN5PE-pz9--eh1zxYsH7UFKJun1F4XPiiNnZChvJEYw==' And then in nodejs:
|
Seems related: |
Nevermind, I see the error in my code is that I thought I could pass the secret along as a string alongside the token when doing Sorry for the noise, and I assume the original poster had a similar problem with this.key! ;-) |
No problem!
Glad you got it sorted :)
… On Aug 25, 2017, at 1:14 PM, Don Spaulding ***@***.***> wrote:
Nevermind, I see the error in my code is that I thought I could pass the secret along as a string alongside the token when doing new Token({secret: <secret_obj_NOT_STRING>, token: <string_to_be_decrypted>, ttl: <int>}).decode()
Sorry for the noise, and I assume the original poster had a similar problem with this.key! ;-)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@donspaulding Hey, I'm doing the exact same thing as you. Encrypting with fernet using the cryptography library on the server and decrypting on the client. Can you explain how you ended up solving this issue? I have the secret as string too but I'm not sure on how to turn it into a usable object. edit: never mind I solved it. |
Hi, I'm facing the same issue, can you please explain how you solved the issue? |
One needs to create a Secret object and then use that when creating the token:
...and then one can use their
|
Hello,
I am using Fernet for Python but im trying to decrypt it from angular2 app. The decryption is not working and it gives me error
This is the code im using to decrypt,
Can you please let me know where i am doing this wrong?
Thanks
The text was updated successfully, but these errors were encountered: