Enum PdfEncryptionType
- java.lang.Object
-
- java.lang.Enum<PdfEncryptionType>
-
- com.ironsoftware.ironpdf.security.PdfEncryptionType
-
- All Implemented Interfaces:
Serializable,Comparable<PdfEncryptionType>
public enum PdfEncryptionType extends Enum<PdfEncryptionType>
The encryption algorithm used to secure a PDF document's content when a password is applied.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PdfEncryptionTypevalueOf(String name)Returns the enum constant of this type with the specified name.static PdfEncryptionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RC4_128
public static final PdfEncryptionType RC4_128
128-bit RC4 encryption (PDF 1.4). This is the default and preserves the historical behavior of IronPDF. RC4 is considered cryptographically weak; prefer AES for new documents.
-
AES_128
public static final PdfEncryptionType AES_128
128-bit AES encryption (PDF 1.5+). Supported by Adobe Acrobat 7 and all modern readers.
-
AES_256
public static final PdfEncryptionType AES_256
256-bit AES encryption (PDF 2.0). The strongest option; supported by Adobe Acrobat 9+ and most modern readers. Passwords are encoded as UTF-8 per ISO 32000-2.
-
-
Method Detail
-
values
public static PdfEncryptionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PdfEncryptionType c : PdfEncryptionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PdfEncryptionType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-