You are here

public static function XMLSecurityKey::fromEncryptedKeyElement in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8

Create key from an EncryptedKey-element.

Parameters

DOMElement $element The EncryptedKey-element.:

Return value

XMLSecurityKey The new key.

Throws

Exception

1 call to XMLSecurityKey::fromEncryptedKeyElement()
XMLSecEnc::staticLocateKeyInfo in src/XMLSecurityKey.php

File

src/XMLSecurityKey.php, line 699

Class

XMLSecurityKey

Namespace

Drupal\miniorange_saml

Code

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;
}