Mods to handle encrypted files on both 32-bit and 64-bit versions of PHP - currently only tested on 32-bit Windows
This commit is contained in:
		
							parent
							
								
									ee03569d72
								
							
						
					
					
						commit
						7a90c5b888
					
				| @ -174,10 +174,10 @@ class PHPExcel_Reader_Excel5_MD5 | |||||||
|         self::step($I, $C, $D, $A, $B, $words[2], 15, 0x2ad7d2bb); |         self::step($I, $C, $D, $A, $B, $words[2], 15, 0x2ad7d2bb); | ||||||
|         self::step($I, $B, $C, $D, $A, $words[9], 21, 0xeb86d391); |         self::step($I, $B, $C, $D, $A, $words[9], 21, 0xeb86d391); | ||||||
| 
 | 
 | ||||||
|         $this->a = ($this->a + $A); |         $this->a = ($this->a + $A) & 0xffffffff; | ||||||
|         $this->b = ($this->b + $B); |         $this->b = ($this->b + $B) & 0xffffffff; | ||||||
|         $this->c = ($this->c + $C); |         $this->c = ($this->c + $C) & 0xffffffff; | ||||||
|         $this->d = ($this->d + $D); |         $this->d = ($this->d + $D) & 0xffffffff; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -207,9 +207,9 @@ class PHPExcel_Reader_Excel5_MD5 | |||||||
| 
 | 
 | ||||||
|     private static function step($func, &$A, $B, $C, $D, $M, $s, $t) |     private static function step($func, &$A, $B, $C, $D, $M, $s, $t) | ||||||
|     { |     { | ||||||
|         $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t); |         $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t) & 0xffffffff; | ||||||
|         $A = self::rotate($A, $s); |         $A = self::rotate($A, $s); | ||||||
|         $A = ($B + $A); |         $A = ($B + $A) & 0xffffffff; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -218,4 +218,4 @@ class PHPExcel_Reader_Excel5_MD5 | |||||||
|         $binary = str_pad(decbin($decimal), 32, "0", STR_PAD_LEFT); |         $binary = str_pad(decbin($decimal), 32, "0", STR_PAD_LEFT); | ||||||
|         return bindec(substr($binary, $bits).substr($binary, 0, $bits)); |         return bindec(substr($binary, $bits).substr($binary, 0, $bits)); | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Mark Baker
						Mark Baker