KeyInfo[0]); } /** * Return the Encryption method used to encrypt the assertion document * (the symmetric cipher) * * @throws Zend_InfoCard_Xml_Exception * @return string The URI of the Symmetric Encryption Method used */ public function getEncryptionMethod() { /** * @todo This is pretty hacky unless we can always be confident that the first * EncryptionMethod block is the correct one (the AES or compariable symetric algorithm).. * the second is the PK method if provided. */ list($encryption_method) = $this->xpath("//enc:EncryptionMethod"); if(!($encryption_method instanceof Zend_InfoCard_Xml_Element)) { throw new Zend_InfoCard_Xml_Exception("Unable to find the enc:EncryptionMethod symmetric encryption block"); } $dom = self::convertToDOM($encryption_method); if(!$dom->hasAttribute('Algorithm')) { throw new Zend_InfoCard_Xml_Exception("Unable to determine the encryption algorithm in the Symmetric enc:EncryptionMethod XML block"); } return $dom->getAttribute('Algorithm'); } /** * Returns the value of the encrypted block * * @return string the value of the encrypted CipherValue block */ abstract function getCipherValue(); }