diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php Thu Jan 20 19:30:54 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; + } +}