PHP Class FPDF_Protection, TeamPass

Inheritance: extends tFPDF
显示文件 Open project: nilsteampassnet/TeamPass Class Usage Examples

Public Properties

Property Type Description
$Ovalue U entry in pdf document
$Pvalue O entry in pdf document
$Uvalue whether document is protected
$enc_obj_id P entry in pdf document
$encrypted

Public Methods

Method Description
SetProtection ( $permissions = [], $user_pass = '', $owner_pass = null ) Function to set permissions as well as user and owner passwords
_Ovalue ( $user_pass, $owner_pass ) Compute O value
_Uvalue ( ) Compute U value
_generateencryptionkey ( $user_pass, $owner_pass, $protection ) Compute encryption key
_md5_16 ( $string ) Get MD5 as binary string
_objectkey ( $n ) Compute key depending on object number where the encrypted data is stored
_putencryption ( )
_putresources ( )
_putstream ( $s ) ************************************************************************** * Private methods * * **************************************************************************
_puttrailer ( )
_textstring ( $s )

Method Details

SetProtection() public method

- permissions is an array with values taken from the following list: copy, print, modify, annot-forms If a value is present it means that the permission is granted - If a user password is set, user will be prompted before document is opened - If an owner password is set, document can be opened in privilege mode with no restriction if that password is entered
public SetProtection ( $permissions = [], $user_pass = '', $owner_pass = null )

_Ovalue() public method

Compute O value
public _Ovalue ( $user_pass, $owner_pass )

_Uvalue() public method

Compute U value
public _Uvalue ( )

_generateencryptionkey() public method

Compute encryption key
public _generateencryptionkey ( $user_pass, $owner_pass, $protection )

_md5_16() public method

Get MD5 as binary string
public _md5_16 ( $string )

_objectkey() public method

Compute key depending on object number where the encrypted data is stored
public _objectkey ( $n )

_putencryption() public method

public _putencryption ( )

_putresources() public method

public _putresources ( )

_putstream() public method

************************************************************************** * Private methods * * **************************************************************************
public _putstream ( $s )

_puttrailer() public method

public _puttrailer ( )

_textstring() public method

public _textstring ( $s )

Property Details

$Ovalue public_oe property

U entry in pdf document
public $Ovalue

$Pvalue public_oe property

O entry in pdf document
public $Pvalue

$Uvalue public_oe property

whether document is protected
public $Uvalue

$enc_obj_id public_oe property

P entry in pdf document
public $enc_obj_id

$encrypted public_oe property

public $encrypted