0

I am running into an issue while using PyAESCrypt. It is unable to encrypt a file.

I have looked everywhere and I am unable to come up with a fix.

accessKey = "Orion"
print("Enter access key")

if accessKey == input():
    print("Correct")

    print("Enter the path to the file you want to encrypt")
    file_name = input("")

    print("Enter the password you want for the encryption")
    password = input()

    def bufferSize(x, y):
        return x * y

    num1 = int(input("Enter first number: "))
    num2 = int(input("Enter second number: "))
    buffer = (bufferSize(num1, num2))

    pyAesCrypt.encryptFile(file_name, (file_name + ".aes"), password, buffer)


    print(buffer)
    print(password)



else:
    print("Incorrect")
    quit()

The expected output is an encrypted file, I'm just getting errors.

Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
  • Looks like you are not passing it a valid file path in some way: https://stackoverflow.com/questions/25584124/oserror-errno-22-invalid-argument-when-use-open-in-python what file path are you entering? – TessellatingHeckler Apr 07 '19 at 05:00
  • What are you entering for `file_name` and does a file exist at that path? – nickglazer Apr 07 '19 at 05:01

0 Answers0