Questions tagged [fernet]

Fernet is a protocol for symmetric encryption providing integrity / authentication, a set of encryption libraries that comply with the protocol and possibly an underlying "hazmat" library that contains a set of cryptographic algorithms.

You can find the Fernet specification here.

Libraries are available for the following programming languages:

Unofficially the following libraries claim conformance:

126 questions
0
votes
0 answers

Why am getting InvalidToken Fernet python

I have a Python script that writes passwords to files these are two separate functions. The first encrypts the file ( After password writing is done ) and the second handles decryption on the file for reading/writing operations. encryption function…
Donald
  • 1
  • 1
-1
votes
1 answer

I have a python error with the cryptography library. Fernet.decrypt() missing 1 required positional argument: 'token'

I am experimenting with the cryptography library in python. I am getting this error: Fernet.decrypt() missing 1 required positional argument: 'token' This error came up while I was trying to decrypt the files. I do not no how to fix this, any…
-1
votes
1 answer

encrypt-decrypt messages with python

I'm new to cryptography and I want to learn how can I encrypt and decrypt messages. For example my message is this: "1234, abcd, '123CE'" will I be able to encrypt this message at once? I tried this: encryption_key = Fernet.generate_key() fernet =…
opia
  • 65
  • 1
  • 7
-1
votes
1 answer

I keep getting Invalid Token error in python cryptography (cryptography.fernet.InvalidToken)

I wrote this prototype code to encrypt some text (and vice - versa). I keep getting this error when I set the command to self.get() while self.write works as it should. I have no idea what causes this error or how to solve it...Help... from…
Anonymous
  • 25
  • 1
  • 5
-2
votes
2 answers

How to avoid/bypass Python Fernet "InvalidToken"

I want to decrypt many files and it's working perfectly (encrypt, decrypt). My problem is that, if any file exists which is not is encrypted, I get an "invalidToken" error message, and the program is unable to decrypt the remaining encrypted…
user21096566
-2
votes
1 answer

How to get a consistent encryption result with Python?

I want to generate consistent encryption results for the same msg every time. Currently, I am getting different encryption results. I am doing something like this from cryptography.fernet import Fernet key = Fernet.generate_key() f =…
TNN
  • 391
  • 1
  • 5
  • 12
1 2 3
8
9