setasign\SetaPDF2\Core\SecHandler

SecHandlerInterface Security handler interface

File: /SetaPDF v2/Core/SecHandler/SecHandlerInterface.php
Old class name (alias): \SetaPDF_Core_SecHandler_SecHandlerInterface

Implemented in

Summary

Methods

auth()

abstract public SecHandlerInterface::auth (
mixed $data = null
): bool

Authenticate to the document with given credentials.

Parameters
$data : mixed

Credentials data

Return Values

Authentication was successful or not

decryptStream()

abstract public SecHandlerInterface::decryptStream (
string $data,
null|array|\SetaPDF_Core_Type_IndirectObject $param = null
): void

Decrypts stream data through the desired security handler.

Parameters
$data : string
 
$param : null|array|\SetaPDF_Core_Type_IndirectObject

An array of possible arguments

decryptString()

abstract public SecHandlerInterface::decryptString (
string $data,
null|array|\SetaPDF_Core_Type_IndirectObject $param = null
): void

Decrypts string data through the desired security handler.

Parameters
$data : string
 
$param : null|array|\SetaPDF_Core_Type_IndirectObject

An array of possible arguments

encryptStream()

abstract public SecHandlerInterface::encryptStream (
string $data,
mixed $param = null
): void

Encrypts stream data through the desired security handler.

Parameters
$data : string
 
$param : mixed
 

encryptString()

abstract public SecHandlerInterface::encryptString (
string $data,
mixed $param = null
): void

Encrypts string data through the desired security handler.

Parameters
$data : string
 
$param : mixed
 

getAuthMode()

abstract public SecHandlerInterface::getAuthMode (
void
): string

Get the auth mode.

getDocument()

Returns the document instance of this security handler.

getEncryptMetadata()

abstract public SecHandlerInterface::getEncryptMetadata (
void
): bool

Returns true if the metadata are/will be encrypted.

getEncryptionDictionary()

Returns the encryption dictionary.

getEncryptionKey()

abstract public SecHandlerInterface::getEncryptionKey (
void
): string

Get the encryption key if known/authenticated.

Exceptions

Throws Exception

getPdfVersion()

abstract public SecHandlerInterface::getPdfVersion (
void
): string

Returns the needed PDF version for this security handler.

getPermission()

abstract public SecHandlerInterface::getPermission (
int $permission
): void

Queries if a permission is granted.

Parameters
$permission : int
 

getPermissions()

abstract public SecHandlerInterface::getPermissions (
void
): int

Returns current permissions.

isAuth()

abstract public SecHandlerInterface::isAuth (
void
): bool

Returns the status if the handler is authenticated and ready to encrypt and decrypt strings or streams.