You are here

public function XMLSecEnc::decryptKey in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

Parameters

XMLSecurityKey $encKey:

Return value

DOMElement|string

Throws

Exception

File

includes/XMLSecurityKey.php, line 2145

Class

XMLSecEnc

Code

public function decryptKey($encKey) {
  if (!$encKey->isEncrypted) {
    throw new Exception("Key is not Encrypted");
  }
  if (empty($encKey->key)) {
    throw new Exception("Key is missing data to perform the decryption");
  }
  return $this
    ->decryptNode($encKey, false);
}