Encrypts the provided data using a specific encryption type.
import { EncryptionType } from '@4thtech-sdk/types';
const dataToEncrypt = new ArrayBuffer(8);
const encryptedData = await encryptionHandler.encrypt(dataToEncrypt, EncryptionType.AES);
A promise that resolves with the encrypted version of the provided data, securely transformed using the specified encryption type.
The raw data that you want to encrypt. It can be of any content type, as long as it's in the ArrayBuffer format.
The type of encryption you want to use to secure the data. It should be one of the encryption types supported by the EncryptionHandler.