public function sealResponse(
        ResponseInterface $response,
        SealingPublicKey $publicKey
    ): ResponseInterface {
        $sealed = Simple::seal(
            (string) $response->getBody(),
            $publicKey
        );
        return $response->withBody(
            $this->adapter->stringToStream(
                Base64UrlSafe::encode($sealed)
            )
        );
    }
public function sealResponse(
        ResponseInterface $response,
        SealingPublicKey $publicKey
    ): ResponseInterface {
        $sealed = Simple::seal(
            (string) $response->getBody(),
            $publicKey
        );
        return $response->withBody(
            $this->adapter->stringToStream(
                Base64UrlSafe::encode($sealed)
            )
        );
    }
public function sealResponse ( ResponseInterface $ response , SealingPublicKey $ publicKey ) : ResponseInterface { $ sealed = Simple :: seal ( ( string ) $ response -> getBody ( ) , $ publicKey ) ; return $ response -> withBody ( $ this -> adapter -> stringToStream ( Base64UrlSafe :: encode ( $ sealed ) ) ) ; }
Encrypt an HTTP response body with a public key.

@param ResponseInterface $response
@param SealingPublicKey $publicKey
@return ResponseInterface
Encrypt an HTTP response body with a public key .