diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,64 @@ +registerXPathNamespace('enc', 'http://www.w3.org/2001/04/xmlenc#'); + + list(,$cipherdata) = $this->xpath("//enc:CipherData"); + + if(!($cipherdata instanceof Zend_InfoCard_Xml_Element)) { + throw new Zend_InfoCard_Xml_Exception("Unable to find the enc:CipherData block"); + } + + list(,$ciphervalue) = $cipherdata->xpath("//enc:CipherValue"); + + if(!($ciphervalue instanceof Zend_InfoCard_Xml_Element)) { + throw new Zend_InfoCard_Xml_Exception("Unable to fidn the enc:CipherValue block"); + } + + return (string)$ciphervalue; + } +}