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
1
vote
1 answer

Which encryption password does cryptography.fernet uses?

I am making a program which encrypts and decrypts texts. I am using Python 3.7 and cryptography.fernet library. I want to enter some information about my program's encryption standard to the GitHub page but I didn't understand which encryption does…
1
vote
0 answers

Python : Cryptography Fernet : Reduce length of encrypted text generated

I am using Cryptography Fernet for encryption and decryption. After encrypting data, it's length is to huge, is there any way to reduce it length or limit it? Example :…
Vaibhav Sawant
  • 341
  • 1
  • 7
  • 22
1
vote
2 answers

Error in SQL statement: NoClassDefFoundError: com/macasaet/fernet/Validator

Currently working on converting below code as "JAR" to register permanent UDF in Databricks cluster. facing issue like NoClassDefFoundError, But i added required Library dependencies while building Jar using SBT. source code :…
Maha
  • 21
  • 2
1
vote
2 answers

Alternative to Fernet Encyption Algorithm w.o Salt

Hi I am new to encryption algorithms and am a little confused by the terminology and what to choose for which situation. For now I don't need the most secure algorithm but it should have the following properties: A shared secret key, that…
baconStrips
  • 101
  • 9
1
vote
1 answer

fernet key error "Fernet key must be 32 url-safe base64-encoded bytes"

I keep getting this error but cant find any helpful information on it. i am not storing it in a file but instead storing it in the decryption code so that no one can see it once it is compiled (if there is a better way of storing the key let me know…
Connor
  • 114
  • 1
  • 11
1
vote
1 answer

Unable to perform Encryption using Fernet-Java in Android Studio

Fernet encryption is my client requirement. I have Fernet key and want to achieve encryption in Java(Android Studio) by follow https://github.com/l0s/fernet-java8 this link. Working on this from last one week but didn't achieve till now anyone can…
1
vote
1 answer

Decrypting multiple files using cryptography.fernet

I am trying to write a code where I can decrypt multiple messages at once from a subdirectory. I created a key directory and a message directory. The key directory contains subdirectories with .key files containing the decryption key. The message…
Daan
  • 11
  • 2
1
vote
1 answer

How to check if a key is already encrypted while using Fernet

I am trying to encrypt sensible values in my environment file using a python script. I am using Fernet. I want to encrypt only those values which are not already encrypted, making sure that there isn't any multi-level encryption. How can I know…
Ayush Pallav
  • 919
  • 9
  • 18
1
vote
1 answer

How to decrypt a value from file, encrypted using Fernet

I am working on decrypting a password reading from a table which was decrypted manually using the cryptography.fernet class in Python manually encrypting the password : key = Fernet.generate_key() f = Fernet(key) eencrypted_passwd =…
Imran
  • 121
  • 4
  • 9
0
votes
1 answer

Django Custom Field with Fernet Cannot Decrypt

This is my custom field that I call in a model. Migrations succeed and I'm able to insert an encrypted value into the data table. However, it will not decrypt. Here's the custom field class: class SecureString(CharField): """Custom Encrypted…
Tyler
  • 33
  • 5
0
votes
2 answers

Python: 'No module named 'cryptography'' even if calling another function in the same script works

If I call "generateKey" from the script below, everything works fine and the keyfile will be generated. But if I call "cryptkey" the error No module named 'cryptography' will occur. import cryptography.fernet def generateKey(keyfile : str): key…
0
votes
0 answers

Fernet can't decrypt with a custom key if I have not encrypted in the same program

I am using Fernet to decrypt a file I know the key too. The file contains nothing sensitive other than some random text. But for some reason, when I use a custom key, I cannot decrypt without encrypting the already encrypted file. This is my code…
0
votes
1 answer

Is there a way to have the original data and the encrypted values side by side?

So, I have a cvs file. My prof wants the submission to contain both, the original data and the encrypted values side by side. I don't know why she wants that as it defeats the purpose of encryption, but that's what she wants. But I have no idea how…
daza
  • 37
  • 3
0
votes
0 answers

Error: raise InvalidToken cryptography.fernet.InvalidToken. ; Python Cryptography.fernet

im rather new to python and even newer to cryptography, using the cryptography.fernet library on vs code. im working on a password manager-type software for fun, and have recently ran into this issue (raise…
0
votes
0 answers

Encrypt and Decrypt Data

I'm a beginner working with Encrypt and Decrypt Data. I am getting an error that the address in def get_secure_address(self) cannot be decoded. It just shows an error code: TypeError: Object of type TypeError is not JSON serializable What am I…
1 2
3
8 9