public function decryptRequestWithSharedKey(
        RequestInterface $request,
        SharedEncryptionKey $key
    ): RequestInterface {
        $encrypted = Base64UrlSafe::decode((string) $request->getBody());
        return $request->withBody(
            $this->adapter->stringToStream(
                Simple::decrypt($encrypted, $key)
            )
        );
    }
public function decryptRequestWithSharedKey(
        RequestInterface $request,
        SharedEncryptionKey $key
    ): RequestInterface {
        $encrypted = Base64UrlSafe::decode((string) $request->getBody());
        return $request->withBody(
            $this->adapter->stringToStream(
                Simple::decrypt($encrypted, $key)
            )
        );
    }
public function decryptRequestWithSharedKey ( RequestInterface $ request , SharedEncryptionKey $ key ) : RequestInterface { $ encrypted = Base64UrlSafe :: decode ( ( string ) $ request -> getBody ( ) ) ; return $ request -> withBody ( $ this -> adapter -> stringToStream ( Simple :: decrypt ( $ encrypted , $ key ) ) ) ; }
Decrypt an HTTP request with a pre-shared key.

@param RequestInterface $request
@param SharedEncryptionKey $key
@return RequestInterface
Decrypt an HTTP request with a pre - shared key .