문제

I have a page in my application where users can upload files. When the file has been uploaded I use the encryptBinary function to encrypt the file:

<cffile file="#getTempDirectory()##uploaded.serverFile#" 
        action="readBinary" 
        variable="binaryFile">
<cfset encrypted = encryptBinary(binaryFile,application.key,"AES")>

But when I then try to decrypt the file using decryptBinary I get the following error:

An error occurred while trying to encrypt or decrypt your input string: Invalid padding

The decryption code is (where readFile contains the result of the encryption):

<cfset decrypted = decryptBinary(readFile,application.key,"AES")>

How might I solve this error? Thanks!

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top