public function createSymmetricEncryptedRequest(
        string $method,
        string $uri,
        string $body,
        SharedEncryptionKey $key,
        array $headers = []
    ): RequestInterface {
        return new Request(
            $method,
            $uri,
            $headers,
            Base64UrlSafe::encode(Simple::encrypt($body, $key))
        );
    }
public function createSymmetricEncryptedRequest(
        string $method,
        string $uri,
        string $body,
        SharedEncryptionKey $key,
        array $headers = []
    ): RequestInterface {
        return new Request(
            $method,
            $uri,
            $headers,
            Base64UrlSafe::encode(Simple::encrypt($body, $key))
        );
    }
public function createSymmetricEncryptedRequest ( string $ method , string $ uri , string $ body , SharedEncryptionKey $ key , array $ headers = [ ] ) : RequestInterface { return new Request ( $ method , $ uri , $ headers , Base64UrlSafe :: encode ( Simple :: encrypt ( $ body , $ key ) ) ) ; }
Encrypt your HTTP request with a pre-shared key.

@param string $method
@param string $uri
@param string $body
@param SharedEncryptionKey $key
@param array $headers
@return RequestInterface
Encrypt your HTTP request with a pre - shared key .