Retrieve the CipherValue text from this encrypted node.
public getCipherValue ( ) : string | null | ||
return | string | null | The Ciphervalue text, or null if no CipherValue is found. |
/** * @throws \Exception */ public function testGetCipherData() { $doc = new \DOMDocument(); $doc->load(dirname(__FILE__) . '/../oaep_sha1-res.xml'); $objenc = new XMLSecEnc(); $encData = $objenc->locateEncryptedData($doc); $objenc->setNode($encData); $ciphervalue = $objenc->getCipherValue(); $this->assertEquals('e3b188c5a139655d14d3f7a1e6477bc3', md5($ciphervalue)); $objKey = $objenc->locateKey(); $objKeyInfo = $objenc->locateKeyInfo($objKey); $encryptedKey = $objKeyInfo->encryptedCtx; $keyCV = $encryptedKey->getCipherValue(); $this->assertEquals('b36f81645cb068dd59d69c7ff96e835a', md5($keyCV)); }