diff -r 000000000000 -r 4eba9c11703f web/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/Zend/InfoCard/Xml/EncryptedData/XmlEnc.php Mon Dec 13 18:29:26 2010 +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; + } +}