## com.lowagie.text.rtf.document
Class RtfProtection

    java.lang.Object
      com.lowagie.text.rtf.document.RtfProtection

    public final class RtfProtection

extends java.lang.Object

`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
Author:
  Howard Shank (hgshank@yahoo.com)

Field Summary
`static int` `AUTOFMTOVERRIDE` STYLELOCKBACKCOMP Allow AutoFormat to override styles and formatting restrictions.
`private static int[][]` `encryptionMatrix` `encryptionMatrix` Table from ECMA-376 Specification
`private static int[]` `initialCodeArray` `initialCodeArray` Table from ECMA-376 Specification
`static int` `LEVEL_ANNOTPROT` ANNNOTPROT Mutually exclusive This document is protected for comments (annotations).
`static int` `LEVEL_FORMPROT` FORMPROT Mutually exclusive Document is protected for forms.
`static int` `LEVEL_NONE` Default for protection level.
`static int` `LEVEL_READPROT` 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\protend
`static int` `LEVEL_REVPROT` REVPROT Mutually exclusive This document is protected for revisions.
`static int` `STYLELOCK` STYLELOCK The document contains styles and formatting restrictions.
`static int` `STYLELOCKBACKCOMP` 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 int` `STYLELOCKENFORCED` STYLELOCKENFORCED The styles and formatting restrictions are being enforced.

Constructor Summary
`RtfProtection()`

Method Summary
`static java.lang.String` `generateHash(java.lang.String pwd)` `generateHash` generates the password hash from a clear text string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### LEVEL_NONE

    public static final int LEVEL_NONE

  Default for protection level.

  Since:
    2.1.1
  See Also:
    Constant Field Values

### LEVEL_REVPROT

    public static final int LEVEL_REVPROT

  REVPROT 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:
    Constant Field Values

### LEVEL_ANNOTPROT

    public static final int LEVEL_ANNOTPROT

  ANNNOTPROT 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:
    Constant Field Values

### LEVEL_FORMPROT

    public static final int LEVEL_FORMPROT

  FORMPROT Mutually exclusive Document is protected for forms. see also \allprot (forms controlword)

  Since:
    2.1.1
  See Also:
    Constant Field Values

### LEVEL_READPROT

    public static final int LEVEL_READPROT

  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\protend

  Since:
    2.1.1
  See Also:
    Constant Field Values

### STYLELOCK

    public static final int STYLELOCK

  STYLELOCK The document contains styles and formatting restrictions.

  Since:
    2.1.1
  See Also:
    Constant Field Values

### STYLELOCKENFORCED

    public static final int STYLELOCKENFORCED

  STYLELOCKENFORCED The styles and formatting restrictions are being enforced.

  Since:
    2.1.1
  See Also:
    Constant Field Values

### STYLELOCKBACKCOMP

    public static final int STYLELOCKBACKCOMP

  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.

  Since:
    2.1.1
  See Also:
    Constant Field Values

### AUTOFMTOVERRIDE

    public static final int AUTOFMTOVERRIDE

  STYLELOCKBACKCOMP 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:
    Constant Field Values

### initialCodeArray

    private static final int[] initialCodeArray

  `initialCodeArray` Table from ECMA-376 Specification

  Since:
    2.1.1

### encryptionMatrix

    private static final int[][] encryptionMatrix

  `encryptionMatrix` Table from ECMA-376 Specification

  Since:
    2.1.1

Constructor Detail

### RtfProtection

    public RtfProtection()

Method Detail

### generateHash

    public static final java.lang.String generateHash(java.lang.String pwd)

  `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

Hosted by Hostbasket