Package com.lowagie.text.rtf.document
Class RtfProtection
java.lang.Object
com.lowagie.text.rtf.document.RtfProtection
RtfProtection
See ECMA Specification for WordprocessingML documentProtection element. Reference: Standard ECMA-376 1st Edition / December 2006 Office Open XML File Formats
- Since:
- 2.1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
STYLELOCKBACKCOMP Allow AutoFormat to override styles and formatting restrictions.private static final int[][]
encryptionMatrix
Table from ECMA-376 Specificationprivate static final int[]
initialCodeArray
Table from ECMA-376 Specificationstatic final int
ANNNOTPROT Mutually exclusive This document is protected for comments (annotations).static final int
FORMPROT Mutually exclusive Document is protected for forms.static final int
Default for protection level.static final int
READPROT Mutually exclusive but can be combined with ANNOTPROT for backward compatibility Document is protected for editing, except areas marked as exceptions by \protstart and\protendstatic final int
REVPROT Mutually exclusive This document is protected for revisions.static final int
STYLELOCK The document contains styles and formatting restrictions.static final int
STYLELOCKBACKCOMP Style lockdown backward compatibility flag, indicating we emitted protection keywords to get documents with styles and formatting restrictions to behave in a reasonable way when opened by older versions.static final int
STYLELOCKENFORCED The styles and formatting restrictions are being enforced. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateHash
(String pwd) generateHash
generates the password hash from a clear text string.
-
Field Details
-
LEVEL_NONE
public static final int LEVEL_NONEDefault for protection level.- Since:
- 2.1.1
- See Also:
-
LEVEL_REVPROT
public static final int LEVEL_REVPROTREVPROT Mutually exclusive This document is protected for revisions. The user can edit the document, but revision marking cannot be disabled.- Since:
- 2.1.1
- See Also:
-
LEVEL_ANNOTPROT
public static final int LEVEL_ANNOTPROTANNNOTPROT Mutually exclusive This document is protected for comments (annotations). The user cannot edit the document but can insert comments (annotations).- Since:
- 2.1.1
- See Also:
-
LEVEL_FORMPROT
public static final int LEVEL_FORMPROTFORMPROT Mutually exclusive Document is protected for forms. see also \allprot (forms controlword)- Since:
- 2.1.1
- See Also:
-
LEVEL_READPROT
public static final int LEVEL_READPROTREADPROT Mutually exclusive but can be combined with ANNOTPROT for backward compatibility Document is protected for editing, except areas marked as exceptions by \protstart and\protend- Since:
- 2.1.1
- See Also:
-
STYLELOCK
public static final int STYLELOCKSTYLELOCK The document contains styles and formatting restrictions.- Since:
- 2.1.1
- See Also:
-
STYLELOCKENFORCED
public static final int STYLELOCKENFORCEDSTYLELOCKENFORCED The styles and formatting restrictions are being enforced.- Since:
- 2.1.1
- See Also:
-
STYLELOCKBACKCOMP
public static final int STYLELOCKBACKCOMPSTYLELOCKBACKCOMP Style lockdown backward compatibility flag, indicating we emitted protection keywords to get documents with styles and formatting restrictions to behave in a reasonable way when opened by older versions.- Since:
- 2.1.1
- See Also:
-
AUTOFMTOVERRIDE
public static final int AUTOFMTOVERRIDESTYLELOCKBACKCOMP Allow AutoFormat to override styles and formatting restrictions. When style protection is on, the user cannot add direct formatting. This setting allows AutoFormat actions to apply direct formatting when needed.- Since:
- 2.1.1
- See Also:
-
initialCodeArray
private static final int[] initialCodeArrayinitialCodeArray
Table from ECMA-376 Specification- Since:
- 2.1.1
-
encryptionMatrix
private static final int[][] encryptionMatrixencryptionMatrix
Table from ECMA-376 Specification- Since:
- 2.1.1
-
-
Constructor Details
-
RtfProtection
public RtfProtection()
-
-
Method Details
-
generateHash
generateHash
generates the password hash from a clear text string.- Parameters:
pwd
- Clear text string input- Returns:
- hex encoded password hash
- Since:
- 2.1.1
-