Skip to main content
Participant
July 18, 2017
Answered

cfpdf encrypt AES_256R5 The password provided is either wrong or does not have sufficient permission to perform this action.

  • July 18, 2017
  • 1 reply
  • 765 views

I can't get cfpdf encrypt AES_256R5 to work it returns the following

An error occurred during PROTECT operation in <CFPDF>.

Error: The password provided is either wrong or does not have sufficient permission to perform this action.

even if I use an AES generated key as newuserpassword it still shows this error.

encrypt="AES_128" works, but I can't use the new  AES_256R5 or AES_256R6

Any idea on what I'm doing wrong? I've tried newownerpassword and setting permissions, same result.

<cfpdf action="read" name="mypdf" source="C:\APPS\\cfpdf\ThePDF.pdf" />

<cfpdf

action="protect"

source="mypdf"

encrypt="AES_256R6"

overwrite="yes"

newuserpassword="re5XBKe+rBriu4UAQgvm7A=="

destination="C:\APPS\\cfpdf\newPDF.pdf" />

    This topic has been closed for replies.
    Correct answer CaseyDougall

    Answered my own question, if I could have only read the thread dump info ahead of time.

    com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityConfigurationException: Cannot init cipher for R5 permissions. Invalid Key

    This is because coldFusion doesn't come with

    Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy

    You have to download this and copy the files to your jre/lib/security folder then restart your ColdFusion instance.

    1 reply

    CaseyDougallAuthorCorrect answer
    Participant
    July 18, 2017

    Answered my own question, if I could have only read the thread dump info ahead of time.

    com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityConfigurationException: Cannot init cipher for R5 permissions. Invalid Key

    This is because coldFusion doesn't come with

    Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy

    You have to download this and copy the files to your jre/lib/security folder then restart your ColdFusion instance.