class XMLSecurityDSig
Constants
XMLDSIGNS |
|
SHA1 |
|
SHA256 |
|
SHA384 |
|
SHA512 |
|
RIPEMD160 |
|
C14N |
|
C14N_COMMENTS |
|
EXC_C14N |
|
EXC_C14N_COMMENTS |
|
template |
|
BASE_TEMPLATE |
|
Properties
DOMElement|null | $sigNode | |||
array | $idKeys | |||
array | $idNS |
Methods
No description
No description
No description
Returns: Bool when verifying HMAC_SHA1; Int otherwise, with following meanings: 1 on succesful signature verification, 0 when signature verification failed, -1 if an error occurred during processing.
This function inserts the signature element.
No description
No description
Details
at line 66
__construct(string $prefix = 'ds')
at line 110
static string
generateGUID(string $prefix = 'pfx')
Generate guid
at line 130
static string
generate_GUID(string $prefix = 'pfx')
deprecated
deprecated
Generate guid
at line 140
DOMNode|null
locateSignature(DOMDocument $objDoc, int $pos = 0)
at line 161
DOMElement
createNewSignNode(string $name, null|string $value = null)
at line 176
setCanonicalMethod(string $method)
at line 251
null|string
canonicalizeSignedInfo()
at line 280
string
calculateDigest(string $digestAlgorithm, string $data, bool $encode = true)
at line 316
bool
validateDigest($refNode, string $data)
at line 334
string
processTransforms($refNode, DOMNode $objData, bool $includeCommentNodes = true)
at line 423
bool
processRefNode(DOMElement $refNode)
at line 491
null
getRefNodeID(DOMElement $refNode)
at line 508
array
getRefIDs()
at line 528
bool
validateReference()
at line 648
addReference(DOMDocument $node, string $algorithm, null|array $arTransforms = null, null|array $options = null)
at line 666
addReferenceList(array $arNodes, string $algorithm, null|array $arTransforms = null, null|array $options = null)
at line 685
DOMElement
addObject(DOMElement|string $data, null|string $mimetype = null, null|string $encoding = null)
at line 710
null|XMLSecurityKey
locateKey(null|DOMNode $node = null)
at line 751
bool|int
verify(XMLSecurityKey $objKey)
Returns: Bool when verifying HMAC_SHA1; Int otherwise, with following meanings: 1 on succesful signature verification, 0 when signature verification failed, -1 if an error occurred during processing.
NOTE: be very careful when checking the int return value, because in PHP, -1 will be cast to True when in boolean context. Always check the return value in a strictly typed way, e.g. "$obj->verify(...) === 1".
at line 770
mixed|string
signData(XMLSecurityKey $objKey, string $data)
at line 780
sign(XMLSecurityKey $objKey, null|DOMNode $appendToNode = null)
at line 808
appendCert()
at line 825
DOMNode
insertSignature(DOMNode $node, DOMNode $beforeNode = null)
This function inserts the signature element.
The signature element will be appended to the element, unless $beforeNode is specified. If $beforeNode is specified, the signature element will be inserted as the last element before $beforeNode.
at line 854
static string
get509XCert(string $cert, bool $isPEMFormat = true)
at line 868
static array
staticGet509XCerts(string $certs, bool $isPEMFormat = true)
at line 905
static
staticAdd509Cert(DOMElement $parentRef, string $cert, bool $isPEMFormat = true, bool $isURL = false, null|DOMXPath $xpath = null, null|array $options = null)
at line 1024
add509Cert(string $cert, bool $isPEMFormat = true, bool $isURL = false, null|array $options = null)
at line 1040
DOMNode
appendToKeyInfo(DOMNode $node)
This function appends a node to the KeyInfo.
The KeyInfo element will be created if one does not exist in the document.
at line 1091
array
getValidatedNodes()
This function retrieves an associative array of the validated nodes.
The array will contain the id of the referenced node as the key and the node itself as the value.</p> <p>Returns: An associative array of validated nodes or null if no nodes have been validated.