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

Métodos públicos

 addReference ($name, $node, $type)
 
 setNode ($node)
 
 encryptNode ($objKey, $replace=true)
 
 encryptReferences ($objKey)
 
 getCipherValue ()
 
 decryptNode ($objKey, $replace=true)
 
 encryptKey ($srcKey, $rawKey, $append=true)
 
 decryptKey ($encKey)
 
 locateEncryptedData ($element)
 
 locateKey ($node=null)
 
 locateKeyInfo ($objBaseKey=null, $node=null)
 

Métodos públicos estáticos

static staticLocateKeyInfo ($objBaseKey=null, $node=null)
 

Campos de datos

const template
 
const Element = 'http://www.w3.org/2001/04/xmlenc#Element'
 
const Content = 'http://www.w3.org/2001/04/xmlenc#Content'
 
const URI = 3
 
const XMLENCNS = 'http://www.w3.org/2001/04/xmlenc#'
 
 $type = null
 
 $encKey = null
 

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 XMLSecEnc.php.

Documentación de las funciones miembro

◆ addReference()

addReference (   $name,
  $node,
  $type 
)
Parámetros
string$name
DOMNode$node
string$type
Excepciones
Exception

Definición en la línea 87 del archivo XMLSecEnc.php.

◆ decryptKey()

decryptKey (   $encKey)
Parámetros
XMLSecurityKey$encKey
Devuelve
DOMElement|string
Excepciones
Exception

Definición en la línea 376 del archivo XMLSecEnc.php.

◆ decryptNode()

decryptNode (   $objKey,
  $replace = true 
)

Decrypt this encrypted node.

The behaviour of this function depends on the value of $replace. If $replace is false, we will return the decrypted data as a string. If $replace is true, we will insert the decrypted element(s) into the document, and return the decrypted element(s).

Parámetros
XMLSecurityKey$objKeyThe decryption key that should be used when decrypting the node.
boolean$replaceWhether we should replace the encrypted node in the XML document with the decrypted data. The default is true.
Devuelve
string|DOMElement The decrypted data.

Definición en la línea 269 del archivo XMLSecEnc.php.

◆ encryptKey()

encryptKey (   $srcKey,
  $rawKey,
  $append = true 
)

Encrypt the XMLSecurityKey

Parámetros
XMLSecurityKey$srcKey
XMLSecurityKey$rawKey
bool$append
Excepciones
Exception

Definición en la línea 330 del archivo XMLSecEnc.php.

◆ encryptNode()

encryptNode (   $objKey,
  $replace = true 
)

Encrypt the selected node with the given key.

Parámetros
XMLSecurityKey$objKeyThe encryption key and algorithm.
bool$replaceWhether the encrypted node should be replaced in the original tree. Default is true.
Excepciones
Exception
Devuelve
DOMElement The <xenc:EncryptedData>-element.

Definición en la línea 128 del archivo XMLSecEnc.php.

◆ encryptReferences()

encryptReferences (   $objKey)
Parámetros
XMLSecurityKey$objKey
Excepciones
Exception

Definición en la línea 203 del archivo XMLSecEnc.php.

◆ getCipherValue()

getCipherValue ( )

Retrieve the CipherValue text from this encrypted node.

Excepciones
Exception
Devuelve
string|null The Ciphervalue text, or null if no CipherValue is found.

Definición en la línea 234 del archivo XMLSecEnc.php.

◆ locateEncryptedData()

locateEncryptedData (   $element)
Parámetros
DOMDocument$element
Devuelve
DOMNode|null

Definición en la línea 394 del archivo XMLSecEnc.php.

◆ locateKey()

locateKey (   $node = null)

Returns the key from the DOM

Parámetros
null | DOMNode$node
Devuelve
null|XMLSecurityKey

Definición en la línea 420 del archivo XMLSecEnc.php.

◆ locateKeyInfo()

locateKeyInfo (   $objBaseKey = null,
  $node = null 
)
Parámetros
null | XMLSecurityKey$objBaseKey
null | DOMNode$node
Devuelve
null|XMLSecurityKey

Definición en la línea 572 del archivo XMLSecEnc.php.

◆ setNode()

setNode (   $node)
Parámetros
DOMNode$node

Definición en la línea 112 del archivo XMLSecEnc.php.

◆ staticLocateKeyInfo()

static staticLocateKeyInfo (   $objBaseKey = null,
  $node = null 
)
static
Parámetros
null | XMLSecurityKey$objBaseKey
null | DOMNode$node
Devuelve
null|XMLSecurityKey
Excepciones
Exception

Definición en la línea 462 del archivo XMLSecEnc.php.

Documentación de los campos

◆ template

const template
Valor inicial:
= "<xenc:EncryptedData xmlns:xenc='http://www.w3.org/2001/04/xmlenc#'>
<xenc:CipherData>
<xenc:CipherValue></xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>"

Definición en la línea 44 del archivo XMLSecEnc.php.


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