コード例 #1
0
 /**
  * Create key from an EncryptedKey-element.
  *
  * @param DOMElement $element The EncryptedKey-element.
  *
  * @return XMLSecurityKey The new key.
  * @throws Exception
  */
 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;
 }
コード例 #2
0
ファイル: XMLSecEnc.php プロジェクト: RichWeber/xmlseclibs
 public function locateKeyInfo($objBaseKey = NULL, $node = NULL)
 {
     if (empty($node)) {
         $node = $this->rawNode;
     }
     return XMLSecEnc::staticLocateKeyInfo($objBaseKey, $node);
 }