You are here

public static function Utilities::decryptElement in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

Decrypt an encrypted element.

Parameters

DOMElement $encryptedData The encrypted data.:

XMLSecurityKey $inputKey The decryption key.:

array $blacklist Blacklisted decryption algorithms.:

Return value

DOMElement The decrypted element.

Throws

Exception

3 calls to Utilities::decryptElement()
SAML2_Assertion::decryptAttributes in includes/Assertion.php
Decrypt the assertion attributes.
SAML2_Assertion::decryptNameId in includes/Assertion.php
Decrypt the NameId of the subject in the assertion.
SAML2_Assertion::__construct in includes/Assertion.php

File

includes/Utilities.php, line 1193

Class

Utilities
This file is part of miniOrange SAML plugin.

Code

public static function decryptElement(DOMElement $encryptedData, XMLSecurityKey $inputKey, array $blacklist = array(), XMLSecurityKey $alternateKey = NULL) {
  try {
    return self::doDecryptElement($encryptedData, $inputKey, $blacklist);
  } catch (Exception $e) {

    //Try with alternate key
    try {
      return self::doDecryptElement($encryptedData, $alternateKey, $blacklist);
    } catch (Exception $t) {
    }

    /*
     * Something went wrong during decryption, but for security
     * reasons we cannot tell the user what failed.
     */
    exit;
  }
}