SetaPDF_Signer_Digest Class offering digest constants and helper methods

File: /SetaPDF v2/Signer/Digest.php

Class hierarchy

Summary

Constants

DSA_ALGORITHM

public const string SetaPDF_Signer_Digest::DSA_ALGORITHM = 'dsa'

Algorithm constant

ECDSA_ALGORITHM

public const string SetaPDF_Signer_Digest::ECDSA_ALGORITHM = 'ecdsa'

Algorithm constant

MD5

public const string SetaPDF_Signer_Digest::MD5 = 'md5'

Digest algorithm

RMD_160

public const string SetaPDF_Signer_Digest::RMD_160 = 'ripemd160'

Digest algorithm

RSA_ALGORITHM

public const string SetaPDF_Signer_Digest::RSA_ALGORITHM = 'rsa'

Algorithm constant

RSA_PSS_ALGORITHM

public const string SetaPDF_Signer_Digest::RSA_PSS_ALGORITHM = 'rsa-dss'

Algorithm constant

SHA_1

public const string SetaPDF_Signer_Digest::SHA_1 = 'sha1'

Digest algorithm

SHA_256

public const string SetaPDF_Signer_Digest::SHA_256 = 'sha256'

Digest algorithm

SHA_384

public const string SetaPDF_Signer_Digest::SHA_384 = 'sha384'

Digest algorithm

SHA_512

public const string SetaPDF_Signer_Digest::SHA_512 = 'sha512'

Digest algorithm


Static Properties

$algorithmOids

static public array SetaPDF_Signer_Digest::$algorithmOids = array(...)

Algorithm OIDs

$encryptionOids

static public array SetaPDF_Signer_Digest::$encryptionOids = array(...)

OIDs for signature algorithms grouped by base algorithms.

$oids

static public array SetaPDF_Signer_Digest::$oids = array(...)

OIDs of specific digest algorithms


Static Methods

getByOid()

public static SetaPDF_Signer_Digest::getByOid (
string $oid
): mixed

Get an OID by a digest.

Parameters
$oid : string
 

getOid()

public static SetaPDF_Signer_Digest::getOid (
string $digest [, null|string $encryptionOid = null ]
): string

Get the OID for a digest algorithm.

Parameters
$digest : string

Digest algorithm, use the constants in SetaPDF_Signer_Digest

$encryptionOid : null|string

algorithm constant

Exceptions

Throws InvalidArgumentException

isValidDigest()

public static SetaPDF_Signer_Digest::isValidDigest (
string $digest
): bool

Check if a digest algorithm is valid/supported.

Parameters
$digest : string
 

Methods

__construct()

This class should not be initiated.