public function testAbstractReturnsInvalidKeyLength() { $this->setExpectedException(UnexpectedValueException::class, 'Key length must be either 40 or 128'); $this->getAbstractEncryption(100)->__construct('', '', '', Permissions::allowNothing()); }
/** * {@inheritdoc} */ protected function createEncryption($userPassword, $ownerPassword = null, Permissions $userPermissions = null) { return new Pdf16Encryption(md5('test', true), $userPassword, $ownerPassword ?: $userPassword, $userPermissions ?: Permissions::allowNothing()); }
public function testZeroPermissions() { $permissions = Permissions::allowNothing(); $this->assertSame(0, $permissions->toInt(2)); $this->assertSame(0, $permissions->toInt(3)); }