forked from tecnickcom/tcexam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- TCPDF Library was updated. - German translation was updated.
- Loading branch information
tecnickcom
committed
Aug 2, 2015
1 parent
f9843e2
commit 71c2aed
Showing
5 changed files
with
125 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,13 @@ TCPDF - README | |
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT. | ||
PLEASE MAKE A DONATION: | ||
http://sourceforge.net/donate/index.php?group_id=128076 | ||
or via PayPal at [email protected] | ||
|
||
------------------------------------------------------------ | ||
|
||
Name: TCPDF | ||
Version: 6.2.9 | ||
Release date: 2015-06-18 | ||
Version: 6.2.11 | ||
Release date: 2015-08-02 | ||
Author: Nicola Asuni | ||
|
||
Copyright (c) 2002-2015: | ||
|
@@ -20,6 +21,7 @@ Copyright (c) 2002-2015: | |
URLs: | ||
http://www.tcpdf.org | ||
http://www.sourceforge.net/projects/tcpdf | ||
https://github.com/tecnickcom/TCPDF | ||
|
||
Description: | ||
TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
//============================================================+ | ||
// File name : tcpdf.php | ||
// Version : 6.2.9 | ||
// Version : 6.2.11 | ||
// Begin : 2002-08-03 | ||
// Last Update : 2015-06-18 | ||
// Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - [email protected] | ||
|
@@ -7026,7 +7026,6 @@ public function Image($file, $x='', $y='', $w=0, $h=0, $type='', $link='', $alig | |
AND (($info === 'pngalpha') OR (isset($info['trns']) AND !empty($info['trns'])))) { | ||
return $this->ImagePngAlpha($file, $x, $y, $pixw, $pixh, $w, $h, 'PNG', $link, $align, $resize, $dpi, $palign, $filehash); | ||
} | ||
$info = false; | ||
} | ||
if (($info === false) AND function_exists($gdfunction)) { | ||
try { | ||
|
@@ -10633,8 +10632,7 @@ protected function _Uvalue() { | |
*/ | ||
protected function _UEvalue() { | ||
$hashkey = hash('sha256', $this->encryptdata['user_password'].$this->encryptdata['UKS'], true); | ||
$iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); | ||
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $hashkey, $this->encryptdata['key'], MCRYPT_MODE_CBC, $iv); | ||
return TCPDF_STATIC::_AESnopad($hashkey, $this->encryptdata['key']); | ||
} | ||
|
||
/** | ||
|
@@ -10684,8 +10682,7 @@ protected function _Ovalue() { | |
*/ | ||
protected function _OEvalue() { | ||
$hashkey = hash('sha256', $this->encryptdata['owner_password'].$this->encryptdata['OKS'].$this->encryptdata['U'], true); | ||
$iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC)); | ||
return mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $hashkey, $this->encryptdata['key'], MCRYPT_MODE_CBC, $iv); | ||
return TCPDF_STATIC::_AESnopad($hashkey, $this->encryptdata['key']); | ||
} | ||
|
||
/** | ||
|
@@ -10740,8 +10737,7 @@ protected function _generateencryptionkey() { | |
} | ||
$perms .= 'adb'; // bytes 9-11 | ||
$perms .= 'nick'; // bytes 12-15 | ||
$iv = str_repeat("\x00", mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB)); | ||
$this->encryptdata['perms'] = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->encryptdata['key'], $perms, MCRYPT_MODE_ECB, $iv); | ||
$this->encryptdata['perms'] = TCPDF_STATIC::_AESnopad($this->encryptdata['key'], $perms); | ||
} else { // RC4-40, RC4-128, AES-128 | ||
// Pad passwords | ||
$this->encryptdata['user_password'] = substr($this->encryptdata['user_password'].TCPDF_STATIC::$enc_padding, 0, 32); | ||
|
@@ -10859,10 +10855,13 @@ public function SetProtection($permissions=array('print', 'modify', 'copy', 'ann | |
$this->encryptdata['StrF'] = 'StdCF'; | ||
} | ||
if ($mode > 1) { // AES | ||
if (!extension_loaded('mcrypt')) { | ||
$this->Error('AES encryption requires mcrypt library (http://www.php.net/manual/en/mcrypt.requirements.php).'); | ||
if (!extension_loaded('openssl') && !extension_loaded('mcrypt')) { | ||
$this->Error('AES encryption requires openssl or mcrypt extension (http://www.php.net/manual/en/mcrypt.requirements.php).'); | ||
} | ||
if (mcrypt_get_cipher_name(MCRYPT_RIJNDAEL_128) === false) { | ||
if (extension_loaded('openssl') && !in_array('aes-256-cbc', openssl_get_cipher_methods())) { | ||
$this->Error('AES encryption requires openssl/aes-256-cbc cypher.'); | ||
} | ||
if (extension_loaded('mcrypt') && mcrypt_get_cipher_name(MCRYPT_RIJNDAEL_128) === false) { | ||
$this->Error('AES encryption requires MCRYPT_RIJNDAEL_128 cypher.'); | ||
} | ||
if (($mode == 3) AND !function_exists('hash')) { | ||
|