PHP Class XMLSecurityDSig

显示文件 Open project: onelogin/php-saml Class Usage Examples

Public Properties

Property Type Description
$idKeys
$idNS
$sigNode

Public Methods

Method Description
__construct ( )
add509Cert ( $cert, $isPEMFormat = true, $isURL = false, $options = null )
addObject ( $data, $mimetype = null, $encoding = null )
addReference ( $node, $algorithm, $arTransforms = null, $options = null )
addReferenceList ( $arNodes, $algorithm, $arTransforms = null, $options = null )
appendCert ( )
appendKey ( $objKey, $parent = null )
appendSignature ( $parentNode, $insertBefore = false )
appendToKeyInfo ( DOMNode $node ) : DOMNode This function appends a node to the KeyInfo.
auxKeyInfo ( $parentRef, $xpath = null )
calculateDigest ( $digestAlgorithm, $data, $encode = true )
canonicalizeSignedInfo ( )
createNewSignNode ( $name, $value = null )
generateGUID ( $prefix = 'pfx' )
get509XCert ( $cert, $isPEMFormat = true )
getRefIDs ( )
getRefNodeID ( $refNode )
getValidatedNodes ( ) * This function retrieves an associative array of the validated nodes.
insertSignature ( $node, $beforeNode = null ) : DOMNode This function inserts the signature element.
locateKey ( $node = null )
locateSignature ( $objDoc, $pos )
processRefNode ( $refNode )
processTransforms ( $refNode, $objData, $includeCommentNodes = true )
setCanonicalMethod ( $method )
sign ( $objKey, $appendToNode = null )
signData ( $objKey, $data )
staticAdd509Cert ( $parentRef, $cert, $isPEMFormat = true, $isURL = false, $xpath = null, $options = null )
staticGet509XCerts ( $certs, $isPEMFormat = true )
validateDigest ( $refNode, $data )
validateReference ( )
verify ( $objKey )

Private Methods

Method Description
addRefInternal ( $sinfoNode, $node, $algorithm, $arTransforms = null, $options = null )
canonicalizeData ( $node, $canonicalmethod, $arXPath = null, $prefixList = null )
getXPathObj ( )
resetXPathObj ( )

Method Details

__construct() public method

public __construct ( )

add509Cert() public method

public add509Cert ( $cert, $isPEMFormat = true, $isURL = false, $options = null )

addObject() public method

public addObject ( $data, $mimetype = null, $encoding = null )

addReference() public method

public addReference ( $node, $algorithm, $arTransforms = null, $options = null )

addReferenceList() public method

public addReferenceList ( $arNodes, $algorithm, $arTransforms = null, $options = null )

appendCert() public method

public appendCert ( )

appendKey() public method

public appendKey ( $objKey, $parent = null )

appendSignature() public method

public appendSignature ( $parentNode, $insertBefore = false )

appendToKeyInfo() public method

The KeyInfo element will be created if one does not exist in the document.
public appendToKeyInfo ( DOMNode $node ) : DOMNode
$node DOMNode The node to append to the KeyInfo.
return DOMNode The KeyInfo element node

auxKeyInfo() static public method

static public auxKeyInfo ( $parentRef, $xpath = null )

calculateDigest() public method

public calculateDigest ( $digestAlgorithm, $data, $encode = true )

canonicalizeSignedInfo() public method

createNewSignNode() public method

public createNewSignNode ( $name, $value = null )

generateGUID() static public method

static public generateGUID ( $prefix = 'pfx' )

get509XCert() static public method

static public get509XCert ( $cert, $isPEMFormat = true )

getRefIDs() public method

public getRefIDs ( )

getRefNodeID() public method

public getRefNodeID ( $refNode )

getValidatedNodes() public method

The array will contain the id of the referenced node as the key and the node itself as the value. Returns: An associative array of validated nodes or null if no nodes have been validated.
public getValidatedNodes ( )

insertSignature() public method

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.
public insertSignature ( $node, $beforeNode = null ) : DOMNode
$node The node the signature element should be inserted into.
$beforeNode The node the signature element should be located before.
return DOMNode The signature element node

locateKey() public method

public locateKey ( $node = null )

locateSignature() public method

public locateSignature ( $objDoc, $pos )

processRefNode() public method

public processRefNode ( $refNode )

processTransforms() public method

public processTransforms ( $refNode, $objData, $includeCommentNodes = true )

setCanonicalMethod() public method

public setCanonicalMethod ( $method )

sign() public method

public sign ( $objKey, $appendToNode = null )

signData() public method

public signData ( $objKey, $data )

staticAdd509Cert() static public method

static public staticAdd509Cert ( $parentRef, $cert, $isPEMFormat = true, $isURL = false, $xpath = null, $options = null )

staticGet509XCerts() static public method

static public staticGet509XCerts ( $certs, $isPEMFormat = true )

validateDigest() public method

public validateDigest ( $refNode, $data )

validateReference() public method

public validateReference ( )

verify() public method

public verify ( $objKey )

Property Details

$idKeys public_oe property

public $idKeys

$idNS public_oe property

public $idNS

$sigNode public_oe property

public $sigNode