Variable CryptoConst

Crypto: unknown

Provides a BaseRest or BaseRealtime instance with the ability to encrypt and decrypt Message payloads.

To create a client that includes this plugin, include it in the client options that you pass to the constructor:

import { BaseRealtime, WebSocketTransport, FetchRequest, Crypto } from 'ably/modular';
const realtime = new BaseRealtime({ ...options, plugins: { WebSocketTransport, FetchRequest, Crypto } });

When provided, you can configure message encryption on a channel via the cipher property of the ChannelOptions that you pass when fetching a channel. If this plugin is not provided, then passing a ChannelOptions with a cipher property will cause a runtime error.

Generated using TypeDoc