passwordEncryption() public méthode

public passwordEncryption ( integer $strength = 128 ) : Pdf
$strength integer the password encryption strength. Default is 128
Résultat Pdf the pdf instance for method chaining
Exemple #1
0
 public function testSet40BitEncryption()
 {
     $document = $this->getDocument1();
     $file = $this->getOutFile();
     $pdf = new Pdf($document);
     $this->assertInstanceOf('mikehaertl\\pdftk\\Pdf', $pdf->passwordEncryption(40));
     $this->assertTrue($pdf->saveAs($file));
     $this->assertFileExists($file);
     $tmpFile = (string) $pdf->getTmpFile();
     $this->assertEquals("pdftk A='{$document}' output '{$tmpFile}' encrypt_40bit", (string) $pdf->getCommand());
 }