Module org.sejda.sambox
Package org.sejda.sambox.encryption
Enum Class StandardSecurityHandlerRevision
java.lang.Object
java.lang.Enum<StandardSecurityHandlerRevision>
org.sejda.sambox.encryption.StandardSecurityHandlerRevision
- All Implemented Interfaces:
Serializable,Comparable<StandardSecurityHandlerRevision>,Constable
Possible Standard Security Handler revisions with bytes length of the encryption key associated to that revision
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intLength of the encryption key in bytesfinal int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateStandardSecurityHandlerRevision(int length, int revisionNumber) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidvoidrequire(StandardSecurityHandlerRevision rev, String message) Requires this revision to be the same version as the given one.voidrequireAtLeast(StandardSecurityHandlerRevision rev, String message) Requires this revision to be at least the same version as the given one.Returns the enum constant of this class with the specified name.static StandardSecurityHandlerRevision[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
R2
-
R3
-
R4
-
R5
-
R6
-
-
Field Details
-
length
public final int lengthLength of the encryption key in bytes -
revisionNumber
public final int revisionNumber
-
-
Constructor Details
-
StandardSecurityHandlerRevision
private StandardSecurityHandlerRevision(int length, int revisionNumber)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
require
Requires this revision to be the same version as the given one. Throws anEncryptionExceptionotherwise.- Parameters:
rev-message- the exception message- Throws:
EncryptionException- if rev is different
-
requireAtLeast
Requires this revision to be at least the same version as the given one. Throws anEncryptionExceptionotherwise.- Parameters:
rev-message-
-
require
-