public static function fromEncryptedKeyElement(DOMElement $element)
    {
        $objenc = new XMLSecEnc();
        $objenc->setNode($element);
        if (!$objKey = $objenc->locateKey()) {
            throw new Exception("Unable to locate algorithm for this Encrypted Key");
        }
        $objKey->isEncrypted = true;
        $objKey->encryptedCtx = $objenc;
        XMLSecEnc::staticLocateKeyInfo($objKey, $element);
        return $objKey;
    }
public static function fromEncryptedKeyElement(DOMElement $element)
    {
        $objenc = new XMLSecEnc();
        $objenc->setNode($element);
        if (!$objKey = $objenc->locateKey()) {
            throw new Exception("Unable to locate algorithm for this Encrypted Key");
        }
        $objKey->isEncrypted = true;
        $objKey->encryptedCtx = $objenc;
        XMLSecEnc::staticLocateKeyInfo($objKey, $element);
        return $objKey;
    }
public static function fromEncryptedKeyElement ( DOMElement $ element ) { $ objenc = new XMLSecEnc ( ) ; $ objenc -> setNode ( $ element ) ; if ( ! $ objKey = $ objenc -> locateKey ( ) ) { throw new Exception ( "Unable to locate algorithm for this Encrypted Key" ) ; } $ objKey -> isEncrypted = true ; $ objKey -> encryptedCtx = $ objenc ; XMLSecEnc :: staticLocateKeyInfo ( $ objKey , $ element ) ; return $ objKey ; }
Create key from an EncryptedKey-element.

@param DOMElement $element The EncryptedKey-element.
@throws Exception

@return XMLSecurityKey The new key.
Create key from an EncryptedKey - element .