Answers for "python encrypt file with password"

1

how to encrypt text in python

text = input()

def encrypt(t):
    chars = list(text)
    allowed_characters = list(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789,.?!")

    for char in chars:
        for i in allowed_characters:
            if char == i:
                chars[chars.index(char)] = allowed_characters.index(i)
    return chars

print(encrypt(text))
Posted by: Guest on December-13-2020
0

find pdf encrypted password with python

import pikepdf

file_path = "path_name"
pdf = pikepdf.open(file_path, allow_overwriting_input=True)
pdf.save('path_name/saved.pdf')
Posted by: Guest on February-08-2021

Code answers related to "python encrypt file with password"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language