PHP Class XMLSecEnc

Show file Open project: onelogin/php-saml Class Usage Examples

Public Properties

Property Type Description
$encKey
$type

Public Methods

Method Description
__construct ( )
addReference ( $name, $node, $type )
decryptKey ( $encKey )
decryptNode ( $objKey, $replace = true ) : string | DOMElement Decrypt this encrypted node.
encryptKey ( $srcKey, $rawKey, $append = true )
encryptNode ( XMLSecurityKey $objKey, boolean $replace = true ) : DOMElement Encrypt the selected node with the given key.
encryptReferences ( $objKey )
getCipherValue ( ) : string | null Retrieve the CipherValue text from this encrypted node.
locateEncryptedData ( $element )
locateKey ( $node = null )
locateKeyInfo ( $objBaseKey = null, $node = null )
setNode ( $node )
staticLocateKeyInfo ( $objBaseKey = null, $node = null )

Private Methods

Method Description
_resetTemplate ( )

Method Details

__construct() public method

public __construct ( )

addReference() public method

public addReference ( $name, $node, $type )

decryptKey() public method

public decryptKey ( $encKey )

decryptNode() public method

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).
public decryptNode ( $objKey, $replace = true ) : string | DOMElement
return string | DOMElement The decrypted data.

encryptKey() public method

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

encryptNode() public method

Encrypt the selected node with the given key.
public encryptNode ( XMLSecurityKey $objKey, boolean $replace = true ) : DOMElement
$objKey XMLSecurityKey The encryption key and algorithm.
$replace boolean Whether the encrypted node should be replaced in the original tree. Default is true.
return DOMElement The -element.

encryptReferences() public method

public encryptReferences ( $objKey )

getCipherValue() public method

Retrieve the CipherValue text from this encrypted node.
public getCipherValue ( ) : string | null
return string | null The Ciphervalue text, or null if no CipherValue is found.

locateEncryptedData() public method

public locateEncryptedData ( $element )

locateKey() public method

public locateKey ( $node = null )

locateKeyInfo() public method

public locateKeyInfo ( $objBaseKey = null, $node = null )

setNode() public method

public setNode ( $node )

staticLocateKeyInfo() static public method

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

Property Details

$encKey public property

public $encKey

$type public property

public $type