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

@param RequestInterface $request
@param SealingPublicKey $publicKey
@return RequestInterface
Encrypt an HTTP request body with a public key .