public function extract(HttpMessageInterface $httpMessage, $privateKey)
    {
        $httpMessage->getBody()->rewind();
        $message = $httpMessage->getBody()->getContents();

        $message = (new Cryptography())->decrypt(base64_decode($message), $privateKey);

        return $this->getMessageExtractor()->extract(\json_decode($message, true));
    }
public function extract(HttpMessageInterface $httpMessage, $privateKey)
    {
        $httpMessage->getBody()->rewind();
        $message = $httpMessage->getBody()->getContents();

        $message = (new Cryptography())->decrypt(base64_decode($message), $privateKey);

        return $this->getMessageExtractor()->extract(\json_decode($message, true));
    }
public function extract ( HttpMessageInterface $ httpMessage , $ privateKey ) { $ httpMessage -> getBody ( ) -> rewind ( ) ; $ message = $ httpMessage -> getBody ( ) -> getContents ( ) ; $ message = ( new Cryptography ( ) ) -> decrypt ( base64_decode ( $ message ) , $ privateKey ) ; return $ this -> getMessageExtractor ( ) -> extract ( \ json_decode ( $ message , true ) ) ; }
Extract a MessageInterface instance from a response

@param HttpMessageInterface $httpMessage
@param string               $privateKey

@return MessageInterface
Extract a MessageInterface instance from a response