class XMLSecEnc

Constants

TEMPLATE

ELEMENT

CONTENT

URI

XMLENCNS

Properties

null|string $type
null|DOMElement $encKey

Methods

__construct()

No description

addReference(string $name, DOMNode $node, string $type)

No description

setNode(DOMNode $node)

No description

encryptNode(XMLSecurityKey $objKey, bool $replace = true)

Encrypt the selected node with the given key.

encryptReferences(XMLSecurityKey $objKey)

No description

string|null
getCipherValue()

Retrieve the CipherValue text from this encrypted node.

string|DOMElement
decryptNode(XMLSecurityKey $objKey, boolean $replace = true)

Decrypt this encrypted node.

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

Encrypt the XMLSecurityKey

DOMElement|string
decryptKey(XMLSecurityKey $encKey)

No description

DOMNode|null
locateEncryptedData(DOMDocument $element)

No description

locateKey(null|DOMNode $node = null)

Returns the key from the DOM

static null|XMLSecurityKey
staticLocateKeyInfo(null|XMLSecurityKey $objBaseKey = null, null|DOMNode $node = null)

No description

locateKeyInfo(null|XMLSecurityKey $objBaseKey = null, null|DOMNode $node = null)

No description

Details

at line 39
__construct()

at line 56
addReference(string $name, DOMNode $node, string $type)

Parameters

string $name
DOMNode $node
string $type

Exceptions

Exception

at line 74
setNode(DOMNode $node)

Parameters

DOMNode $node

at line 88
DOMElement encryptNode(XMLSecurityKey $objKey, bool $replace = true)

Encrypt the selected node with the given key.

Parameters

XMLSecurityKey $objKey The encryption key and algorithm.
bool $replace Whether the encrypted node should be replaced in the original tree. Default is true.

Return Value

DOMElement The <xenc:EncryptedData>-element.

Exceptions

Exception

at line 156
encryptReferences(XMLSecurityKey $objKey)

Parameters

XMLSecurityKey $objKey

Exceptions

Exception

at line 183
string|null getCipherValue()

Retrieve the CipherValue text from this encrypted node.

Return Value

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

Exceptions

Exception

at line 218
string|DOMElement decryptNode(XMLSecurityKey $objKey, boolean $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).

Parameters

XMLSecurityKey $objKey The decryption key that should be used when decrypting the node.
boolean $replace Whether we should replace the encrypted node in the XML document with the decrypted data. The default is true.

Return Value

string|DOMElement The decrypted data.

Exceptions

Exception

at line 268
encryptKey(XMLSecurityKey $srcKey, XMLSecurityKey $rawKey, bool $append = true)

Encrypt the XMLSecurityKey

Parameters

XMLSecurityKey $srcKey
XMLSecurityKey $rawKey
bool $append

Exceptions

Exception

at line 306
DOMElement|string decryptKey(XMLSecurityKey $encKey)

Parameters

XMLSecurityKey $encKey

Return Value

DOMElement|string

Exceptions

Exception

at line 321
DOMNode|null locateEncryptedData(DOMDocument $element)

Parameters

DOMDocument $element

Return Value

DOMNode|null

at line 342
null|XMLSecurityKey locateKey(null|DOMNode $node = null)

Returns the key from the DOM

Parameters

null|DOMNode $node

Return Value

null|XMLSecurityKey

at line 374
static null|XMLSecurityKey staticLocateKeyInfo(null|XMLSecurityKey $objBaseKey = null, null|DOMNode $node = null)

Parameters

null|XMLSecurityKey $objBaseKey
null|DOMNode $node

Return Value

null|XMLSecurityKey

Exceptions

Exception

at line 468
null|XMLSecurityKey locateKeyInfo(null|XMLSecurityKey $objBaseKey = null, null|DOMNode $node = null)

Parameters

null|XMLSecurityKey $objBaseKey
null|DOMNode $node

Return Value

null|XMLSecurityKey

Exceptions

Exception