src/Slim.php
public function createSymmetricEncryptedRequest(
        string $method,
        string $uri,
        string $body,
        SharedEncryptionKey $key,
        array $headers = []
    ): RequestInterface {
        return new Request(
            $method,
            Uri::createFromString($uri),
            new Headers($headers),
            [],
            [],
            $this->stringToStream(
                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::createFromString($uri),
            new Headers($headers),
            [],
            [],
            $this->stringToStream(
                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