Beispiel #1
0
 /**
  * @param  string $permanentFileIdentifier
  * @return EncryptionInterface
  */
 public function getEncryption($permanentFileIdentifier)
 {
     if (null === $this->encryptionOptions) {
         return new NullEncryption();
     }
     return AbstractEncryption::forPdfVersion($this->pdfVersion, $permanentFileIdentifier, $this->encryptionOptions);
 }
 public function testForPdfVersion()
 {
     $this->assertInstanceOf(Pdf11Encryption::class, AbstractEncryption::forPdfVersion('1.3', '', new EncryptionOptions('')));
     $this->assertInstanceOf(Pdf14Encryption::class, AbstractEncryption::forPdfVersion('1.4', '', new EncryptionOptions('')));
     $this->assertInstanceOf(Pdf14Encryption::class, AbstractEncryption::forPdfVersion('1.5', '', new EncryptionOptions('')));
     $this->assertInstanceOf(Pdf16Encryption::class, AbstractEncryption::forPdfVersion('1.6', '', new EncryptionOptions('')));
     $this->assertInstanceOf(Pdf16Encryption::class, AbstractEncryption::forPdfVersion('1.7', '', new EncryptionOptions('')));
 }