WSCOMUN  2.1.2
Web Services Comunes para PHP/GVHidra
Métodos públicos | Métodos públicos estáticos | Campos de datos
Referencia de la Clase XMLSecurityDSig

Métodos públicos

 __construct ($prefix='ds')
 
 locateSignature ($objDoc, $pos=0)
 
 createNewSignNode ($name, $value=null)
 
 setCanonicalMethod ($method)
 
 canonicalizeSignedInfo ()
 
 calculateDigest ($digestAlgorithm, $data, $encode=true)
 
 validateDigest ($refNode, $data)
 
 processTransforms ($refNode, $objData, $includeCommentNodes=true)
 
 processRefNode ($refNode)
 
 getRefNodeID ($refNode)
 
 getRefIDs ()
 
 validateReference ()
 
 addReference ($node, $algorithm, $arTransforms=null, $options=null)
 
 addReferenceList ($arNodes, $algorithm, $arTransforms=null, $options=null)
 
 addObject ($data, $mimetype=null, $encoding=null)
 
 locateKey ($node=null)
 
 verify ($objKey)
 
 signData ($objKey, $data)
 
 sign ($objKey, $appendToNode=null)
 
 appendCert ()
 
 appendKey ($objKey, $parent=null)
 
 insertSignature ($node, $beforeNode=null)
 
 appendSignature ($parentNode, $insertBefore=false)
 
 add509Cert ($cert, $isPEMFormat=true, $isURL=false, $options=null)
 
 appendToKeyInfo ($node)
 
 getValidatedNodes ()
 

Métodos públicos estáticos

static generateGUID ($prefix='pfx')
 
static generate_GUID ($prefix='pfx')
 
static get509XCert ($cert, $isPEMFormat=true)
 
static staticGet509XCerts ($certs, $isPEMFormat=true)
 
static staticAdd509Cert ($parentRef, $cert, $isPEMFormat=true, $isURL=false, $xpath=null, $options=null)
 

Campos de datos

const XMLDSIGNS = 'http://www.w3.org/2000/09/xmldsig#'
 
const SHA1 = 'http://www.w3.org/2000/09/xmldsig#sha1'
 
const SHA256 = 'http://www.w3.org/2001/04/xmlenc#sha256'
 
const SHA384 = 'http://www.w3.org/2001/04/xmldsig-more#sha384'
 
const SHA512 = 'http://www.w3.org/2001/04/xmlenc#sha512'
 
const RIPEMD160 = 'http://www.w3.org/2001/04/xmlenc#ripemd160'
 
const C14N = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315'
 
const C14N_COMMENTS = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments'
 
const EXC_C14N = 'http://www.w3.org/2001/10/xml-exc-c14n#'
 
const EXC_C14N_COMMENTS = 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments'
 
const template
 
const BASE_TEMPLATE
 
 $sigNode = null
 
 $idKeys = array ()
 
 $idNS = array ()
 

Descripción detallada

xmlseclibs.php

Copyright (c) 2007-2015, Robert Richards rrich.nosp@m.ards.nosp@m.@cdat.nosp@m.azon.nosp@m.e.org. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Autor
Robert Richards rrich.nosp@m.ards.nosp@m.@cdat.nosp@m.azon.nosp@m.e.org

Definición en la línea 42 del archivo XMLSecurityDSig.php.

Documentación del constructor y destructor

◆ __construct()

__construct (   $prefix = 'ds')
Parámetros
string$prefix

Definición en la línea 91 del archivo XMLSecurityDSig.php.

Documentación de las funciones miembro

◆ add509Cert()

add509Cert (   $cert,
  $isPEMFormat = true,
  $isURL = false,
  $options = null 
)
Parámetros
string$cert
bool$isPEMFormat
bool$isURL
null | array$options

Definición en la línea 1192 del archivo XMLSecurityDSig.php.

◆ addObject()

addObject (   $data,
  $mimetype = null,
  $encoding = null 
)
Parámetros
DOMElement | string$data
null | string$mimetype
null | string$encoding
Devuelve
DOMElement

Definición en la línea 797 del archivo XMLSecurityDSig.php.

◆ addReference()

addReference (   $node,
  $algorithm,
  $arTransforms = null,
  $options = null 
)
Parámetros
DOMDocument$node
string$algorithm
null | array$arTransforms
null | array$options

Definición en la línea 754 del archivo XMLSecurityDSig.php.

◆ addReferenceList()

addReferenceList (   $arNodes,
  $algorithm,
  $arTransforms = null,
  $options = null 
)
Parámetros
array$arNodes
string$algorithm
null | array$arTransforms
null | array$options

Definición en la línea 774 del archivo XMLSecurityDSig.php.

◆ appendKey()

appendKey (   $objKey,
  $parent = null 
)
Parámetros
XMLSecurityKey$objKey
null | DOMNode$parent

Definición en la línea 939 del archivo XMLSecurityDSig.php.

◆ appendSignature()

appendSignature (   $parentNode,
  $insertBefore = false 
)
Parámetros
DOMNode$parentNode
bool$insertBefore
Devuelve
DOMNode

Definición en la línea 977 del archivo XMLSecurityDSig.php.

◆ appendToKeyInfo()

appendToKeyInfo (   $node)

This function appends a node to the KeyInfo.

The KeyInfo element will be created if one does not exist in the document.

Parámetros
DOMNode$nodeThe node to append to the KeyInfo.
Devuelve
DOMNode The KeyInfo element node

Definición en la línea 1210 del archivo XMLSecurityDSig.php.

◆ calculateDigest()

calculateDigest (   $digestAlgorithm,
  $data,
  $encode = true 
)
Parámetros
string$digestAlgorithm
string$data
bool$encode
Devuelve
string
Excepciones
Exception

Definición en la línea 338 del archivo XMLSecurityDSig.php.

◆ canonicalizeSignedInfo()

canonicalizeSignedInfo ( )
Devuelve
null|string

Definición en la línea 305 del archivo XMLSecurityDSig.php.

◆ createNewSignNode()

createNewSignNode (   $name,
  $value = null 
)
Parámetros
string$name
null | string$value
Devuelve
DOMElement

Definición en la línea 202 del archivo XMLSecurityDSig.php.

◆ generate_GUID()

static generate_GUID (   $prefix = 'pfx')
static

Generate guid

Parámetros
string$prefixPrefix to use for guid. defaults to pfx
Devuelve
string The generated guid
Obsoleto:
Method deprecated in Release 1.4.1

Definición en la línea 163 del archivo XMLSecurityDSig.php.

◆ generateGUID()

static generateGUID (   $prefix = 'pfx')
static

Generate guid

Parámetros
string$prefixPrefix to use for guid. defaults to pfx
Devuelve
string The generated guid

Definición en la línea 146 del archivo XMLSecurityDSig.php.

◆ get509XCert()

static get509XCert (   $cert,
  $isPEMFormat = true 
)
static
Parámetros
string$cert
bool$isPEMFormat
Devuelve
string

Definición en la línea 989 del archivo XMLSecurityDSig.php.

◆ getRefIDs()

getRefIDs ( )
Devuelve
array
Excepciones
Exception

Definición en la línea 607 del archivo XMLSecurityDSig.php.

◆ getRefNodeID()

getRefNodeID (   $refNode)
Parámetros
DOMNode$refNode
Devuelve
null

Definición en la línea 586 del archivo XMLSecurityDSig.php.

◆ getValidatedNodes()

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.

Returns: An associative array of validated nodes or null if no nodes have been validated.

Devuelve
array Associative array of validated nodes

Definición en la línea 1260 del archivo XMLSecurityDSig.php.

◆ insertSignature()

insertSignature (   $node,
  $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.

Parámetros
DOMNode$nodeThe node the signature element should be inserted into.
DOMNode$beforeNodeThe node the signature element should be located before.
Devuelve
DOMNode The signature element node

Definición en la línea 957 del archivo XMLSecurityDSig.php.

◆ locateKey()

locateKey (   $node = null)
Parámetros
null | DOMNode$node
Devuelve
null|XMLSecurityKey

Definición en la línea 826 del archivo XMLSecurityDSig.php.

◆ locateSignature()

locateSignature (   $objDoc,
  $pos = 0 
)
Parámetros
DOMDocument$objDoc
int$pos
Devuelve
DOMNode|null

Definición en la línea 174 del archivo XMLSecurityDSig.php.

◆ processRefNode()

processRefNode (   $refNode)
Parámetros
DOMNode$refNode
Devuelve
bool

Definición en la línea 503 del archivo XMLSecurityDSig.php.

◆ processTransforms()

processTransforms (   $refNode,
  $objData,
  $includeCommentNodes = true 
)
Parámetros
$refNode
DOMNode$objData
bool$includeCommentNodes
Devuelve
string

Definición en la línea 395 del archivo XMLSecurityDSig.php.

◆ setCanonicalMethod()

setCanonicalMethod (   $method)
Parámetros
string$method
Excepciones
Exception

Definición en la línea 221 del archivo XMLSecurityDSig.php.

◆ sign()

sign (   $objKey,
  $appendToNode = null 
)
Parámetros
XMLSecurityKey$objKey
null | DOMNode$appendToNode

Definición en la línea 896 del archivo XMLSecurityDSig.php.

◆ signData()

signData (   $objKey,
  $data 
)
Parámetros
XMLSecurityKey$objKey
string$data
Devuelve
mixed|string

Definición en la línea 886 del archivo XMLSecurityDSig.php.

◆ staticAdd509Cert()

static staticAdd509Cert (   $parentRef,
  $cert,
  $isPEMFormat = true,
  $isURL = false,
  $xpath = null,
  $options = null 
)
static
Parámetros
DOMElement$parentRef
string$cert
bool$isPEMFormat
bool$isURL
null | DOMXPath$xpath
null | array$options
Excepciones
Exception

Definición en la línea 1054 del archivo XMLSecurityDSig.php.

◆ staticGet509XCerts()

static staticGet509XCerts (   $certs,
  $isPEMFormat = true 
)
static
Parámetros
string$certs
bool$isPEMFormat
Devuelve
array

Definición en la línea 1005 del archivo XMLSecurityDSig.php.

◆ validateDigest()

validateDigest (   $refNode,
  $data 
)
Parámetros
$refNode
string$data
Devuelve
bool

Definición en la línea 375 del archivo XMLSecurityDSig.php.

◆ validateReference()

validateReference ( )
Devuelve
bool
Excepciones
Exception

Definición en la línea 629 del archivo XMLSecurityDSig.php.

◆ verify()

verify (   $objKey)
Parámetros
XMLSecurityKey$objKey
Devuelve
bool|int
Excepciones
Exception

Definición en la línea 866 del archivo XMLSecurityDSig.php.

Documentación de los campos

◆ BASE_TEMPLATE

const BASE_TEMPLATE
Valor inicial:
= '<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<SignatureMethod />
</SignedInfo>
</Signature>'

Definición en la línea 59 del archivo XMLSecurityDSig.php.

◆ template

const template
Valor inicial:
= '<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:SignatureMethod />
</ds:SignedInfo>
</ds:Signature>'

Definición en la línea 54 del archivo XMLSecurityDSig.php.


La documentación para esta clase fue generada a partir del siguiente fichero: