Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf.Security Namespace / StandardSecurityHandlerRev3 Class / EncryptionKeyLength Property

In This Topic
    EncryptionKeyLength Property
    In This Topic
    Gets or sets the length of the encryption key, in bits. The value must be a multiple of 8, in the range from 40 to 128.

    IMPORTANT NOTE: StandardSecurityHandlerRev4 can use RC4 or AES encryption, and according to specification, with RC4 any key length in the range from 40 to 128 can be used. But tests show that current/recent versions of Adobe Acrobat Reader DC and Adobe Acrobat Pro DC cannot handle files encrypted with RC4 if the key length is not equal to 128. Older versions of Acrobat Reader handle such files without issues, so it looks like a bug in the newer versions of Acrobat Reader. So it is recommended that StandardSecurityHandlerRev3 is used in cases when RC4 encryption with key length other than 128 is required.

    Syntax
    'Declaration
     
    Public Property EncryptionKeyLength As System.Integer
    public System.int EncryptionKeyLength {get; set;}
    See Also