first commit

This commit is contained in:
2025-03-25 20:32:26 +00:00
commit da487f3870
70 changed files with 17146 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
from fernet import Fernet
# Generate a Fernet key
key = b'XBxB603cX_mULEXxfavOg3FDc0Ox3gChwYEY-Uxd3tE='
pwd = 'black'
key = bytes((pwd*10)[:43]+"=", "ascii")
print(key)
# Create a Fernet object with that key
f = Fernet(key)
# Input string to be encrypted
input_string = "Hello World!Hello World!Hello World!Hello World!Hello World!"
# Encrypt the string
encrypted_string = f.encrypt(input_string.encode()).decode()
print(encrypted_string)
# Decrypt the encrypted string
decrypted_string = f.decrypt(encrypted_string.encode()).decode()
# Print the original and decrypted strings
print("Original String:", input_string)
print("Decrypted String:", decrypted_string)