ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct () | |
addReference ($name, $node, $type) | |
setNode ($node) | |
encryptNode ($objKey, $replace=true) | |
Encrypt the selected node with the given key. More... | |
encryptReferences ($objKey) | |
getCipherValue () | |
Retrieve the CipherValue text from this encrypted node. More... | |
decryptNode ($objKey, $replace=true) | |
Decrypt this encrypted node. More... | |
encryptKey ($srcKey, $rawKey, $append=true) | |
Encrypt the XMLSecurityKey. More... | |
decryptKey ($encKey) | |
locateEncryptedData ($element) | |
locateKey ($node=null) | |
Returns the key from the DOM. More... | |
locateKeyInfo ($objBaseKey=null, $node=null) | |
Static Public Member Functions | |
static | staticLocateKeyInfo ($objBaseKey=null, $node=null) |
Data Fields | |
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 | |
Private Member Functions | |
_resetTemplate () | |
Private Attributes | |
$encdoc = null | |
$rawNode = null | |
$references = array() | |
Copyright (c) 2007-2019, Robert Richards rrich. All rights reserved. ards @cdat azon e.org
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.
Definition at line 50 of file XMLSecEnc.php.
RobRichards\XMLSecLibs\XMLSecEnc::__construct | ( | ) |
Definition at line 78 of file XMLSecEnc.php.
References RobRichards\XMLSecLibs\XMLSecEnc\_resetTemplate().
|
private |
Definition at line 83 of file XMLSecEnc.php.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\__construct(), and RobRichards\XMLSecLibs\XMLSecEnc\addReference().
RobRichards\XMLSecLibs\XMLSecEnc::addReference | ( | $name, | |
$node, | |||
$type | |||
) |
string | $name | |
DOMNode | $node | |
string | $type |
Exception |
Definition at line 95 of file XMLSecEnc.php.
References RobRichards\XMLSecLibs\XMLSecEnc\$encdoc, $name, RobRichards\XMLSecLibs\XMLSecEnc\$type, RobRichards\XMLSecLibs\XMLSecEnc\_resetTemplate(), and RobRichards\XMLSecLibs\XMLSecurityDSig\generateGUID().
RobRichards\XMLSecLibs\XMLSecEnc::decryptKey | ( | $encKey | ) |
XMLSecurityKey | $encKey |
Exception |
Definition at line 342 of file XMLSecEnc.php.
References RobRichards\XMLSecLibs\XMLSecEnc\$encKey, and RobRichards\XMLSecLibs\XMLSecEnc\decryptNode().
RobRichards\XMLSecLibs\XMLSecEnc::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).
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. |
Definition at line 254 of file XMLSecEnc.php.
References RobRichards\XMLSecLibs\XMLSecEnc\$rawNode, and RobRichards\XMLSecLibs\XMLSecEnc\getCipherValue().
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\decryptKey().
RobRichards\XMLSecLibs\XMLSecEnc::encryptKey | ( | $srcKey, | |
$rawKey, | |||
$append = true |
|||
) |
Encrypt the XMLSecurityKey.
XMLSecurityKey | $srcKey | |
XMLSecurityKey | $rawKey | |
bool | $append |
Exception |
Definition at line 304 of file XMLSecEnc.php.
References RobRichards\XMLSecLibs\XMLSecEnc\$encKey, $name, and $root.
RobRichards\XMLSecLibs\XMLSecEnc::encryptNode | ( | $objKey, | |
$replace = true |
|||
) |
Encrypt the selected node with the given key.
XMLSecurityKey | $objKey | The encryption key and algorithm. |
bool | $replace | Whether the encrypted node should be replaced in the original tree. Default is true. |
Exception |
Definition at line 127 of file XMLSecEnc.php.
References $data, and RobRichards\XMLSecLibs\XMLSecEnc\$encdoc.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\encryptReferences().
RobRichards\XMLSecLibs\XMLSecEnc::encryptReferences | ( | $objKey | ) |
XMLSecurityKey | $objKey |
Exception |
Definition at line 193 of file XMLSecEnc.php.
References $name, RobRichards\XMLSecLibs\XMLSecEnc\$rawNode, RobRichards\XMLSecLibs\XMLSecEnc\$type, and RobRichards\XMLSecLibs\XMLSecEnc\encryptNode().
RobRichards\XMLSecLibs\XMLSecEnc::getCipherValue | ( | ) |
Retrieve the CipherValue text from this encrypted node.
Exception |
Definition at line 220 of file XMLSecEnc.php.
References $query.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\decryptNode().
RobRichards\XMLSecLibs\XMLSecEnc::locateEncryptedData | ( | $element | ) |
DOMDocument | $element |
Definition at line 357 of file XMLSecEnc.php.
References $query.
RobRichards\XMLSecLibs\XMLSecEnc::locateKey | ( | $node = null | ) |
Returns the key from the DOM.
null | DOMNode | $node |
Definition at line 378 of file XMLSecEnc.php.
References $query, and RobRichards\XMLSecLibs\XMLSecEnc\$rawNode.
RobRichards\XMLSecLibs\XMLSecEnc::locateKeyInfo | ( | $objBaseKey = null , |
|
$node = null |
|||
) |
null | XMLSecurityKey | $objBaseKey | |
null | DOMNode | $node |
Definition at line 503 of file XMLSecEnc.php.
References RobRichards\XMLSecLibs\XMLSecEnc\$rawNode.
RobRichards\XMLSecLibs\XMLSecEnc::setNode | ( | $node | ) |
DOMNode | $node |
Definition at line 113 of file XMLSecEnc.php.
|
static |
null | XMLSecurityKey | $objBaseKey | |
null | DOMNode | $node |
Exception |
Definition at line 410 of file XMLSecEnc.php.
References $id, $query, RobRichards\XMLSecLibs\XMLSecEnc\$type, RobRichards\XMLSecLibs\XMLSecurityKey\convertRSA(), RobRichards\XMLSecLibs\XMLSecurityKey\fromEncryptedKeyElement(), and RobRichards\XMLSecLibs\XMLSecurityDSig\XMLDSIGNS.
Referenced by SimpleSAML\XML\Validator\__construct(), and RobRichards\XMLSecLibs\XMLSecurityKey\fromEncryptedKeyElement().
|
private |
Definition at line 64 of file XMLSecEnc.php.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\addReference(), and RobRichards\XMLSecLibs\XMLSecEnc\encryptNode().
RobRichards\XMLSecLibs\XMLSecEnc::$encKey = null |
Definition at line 73 of file XMLSecEnc.php.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\decryptKey(), and RobRichards\XMLSecLibs\XMLSecEnc\encryptKey().
|
private |
Definition at line 67 of file XMLSecEnc.php.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\decryptNode(), RobRichards\XMLSecLibs\XMLSecEnc\encryptReferences(), RobRichards\XMLSecLibs\XMLSecEnc\locateKey(), and RobRichards\XMLSecLibs\XMLSecEnc\locateKeyInfo().
|
private |
Definition at line 76 of file XMLSecEnc.php.
RobRichards\XMLSecLibs\XMLSecEnc::$type = null |
Definition at line 70 of file XMLSecEnc.php.
Referenced by RobRichards\XMLSecLibs\XMLSecEnc\addReference(), RobRichards\XMLSecLibs\XMLSecEnc\encryptReferences(), and RobRichards\XMLSecLibs\XMLSecEnc\staticLocateKeyInfo().
const RobRichards\XMLSecLibs\XMLSecEnc::Content = 'http://www.w3.org/2001/04/xmlenc#Content' |
Definition at line 59 of file XMLSecEnc.php.
const RobRichards\XMLSecLibs\XMLSecEnc::Element = 'http://www.w3.org/2001/04/xmlenc#Element' |
Definition at line 58 of file XMLSecEnc.php.
const RobRichards\XMLSecLibs\XMLSecEnc::template |
Definition at line 52 of file XMLSecEnc.php.
const RobRichards\XMLSecLibs\XMLSecEnc::URI = 3 |
Definition at line 60 of file XMLSecEnc.php.
const RobRichards\XMLSecLibs\XMLSecEnc::XMLENCNS = 'http://www.w3.org/2001/04/xmlenc#' |
Definition at line 61 of file XMLSecEnc.php.