SetaPDF_Signer_Digest Class offering digest constants and helper methods

File: /SetaPDF/Signer/Digest.php

Class hierarchy

Summary

Constants

DSA_ALGORITHM

const string SetaPDF_Signer_Digest::DSA_ALGORITHM = 'dsa'

Algorithm constant

ECDSA_ALGORITHM

const string SetaPDF_Signer_Digest::ECDSA_ALGORITHM = 'ecdsa'

Algorithm constant

MD5

const string SetaPDF_Signer_Digest::MD5 = 'md5'

Digest algorithm

RMD_160

const string SetaPDF_Signer_Digest::RMD_160 = 'ripemd160'

Digest algorithm

RSA_ALGORITHM

const string SetaPDF_Signer_Digest::RSA_ALGORITHM = 'rsa'

Algorithm constant

SHA_1

const string SetaPDF_Signer_Digest::SHA_1 = 'sha1'

Digest algorithm

SHA_256

const string SetaPDF_Signer_Digest::SHA_256 = 'sha256'

Digest algorithm

SHA_384

const string SetaPDF_Signer_Digest::SHA_384 = 'sha384'

Digest algorithm

SHA_512

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 encryption grouped by algorithms

$oids

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

OIDs of specific digest algorithms


Static Methods

getByOid()

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

Get an OID by a digest.

Parameters
$oid : string
 

getOid()

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

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

getOpenSslInt()

static public int SetaPDF_Signer_Digest::getOpenSslInt ( $digest $digest )

Get digest as integer value for openssl functions.

TODO: REMOVE AS SOON AS PHP 5.2 SUPPORT IS DROPPED

Parameters
$digest : $digest
 
Exceptions

Throws InvalidArgumentException

isValidDigest()

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

Check if a digest algorithm is valid/supported.

Parameters
$digest : $digest
 

Methods

__construct()

This class should not be initiated.