public function createSymmetricEncryptedResponse(
        int $status,
        string $body,
        SharedEncryptionKey $key,
        array $headers = [],
        string $version = '1.1'
    ): ResponseInterface {
        return new Response(
            $status,
            $headers,
            Base64UrlSafe::encode(Simple::encrypt($body, $key)),
            $version
        );
    }
public function createSymmetricEncryptedResponse(
        int $status,
        string $body,
        SharedEncryptionKey $key,
        array $headers = [],
        string $version = '1.1'
    ): ResponseInterface {
        return new Response(
            $status,
            $headers,
            Base64UrlSafe::encode(Simple::encrypt($body, $key)),
            $version
        );
    }
public function createSymmetricEncryptedResponse ( int $ status , string $ body , SharedEncryptionKey $ key , array $ headers = [ ] , string $ version = '1.1' ) : ResponseInterface { return new Response ( $ status , $ headers , Base64UrlSafe :: encode ( Simple :: encrypt ( $ body , $ key ) ) , $ version ) ; }
Encrypt your HTTP response with a pre-shared key.

@param int $status
@param string $body
@param SharedEncryptionKey $key
@param array $headers
@param string $version
@return ResponseInterface
Encrypt your HTTP response with a pre - shared key .