Class responsible for handling different encryption implementations. It provides functionalities to encrypt and decrypt data based on the specified encryption type, allowing you to manage and use multiple encryption algorithms seamlessly.
Usage
Below is a minimal example of how to initialize EncryptionHandler.
import{EncryptionHandler}from'@4thtech-sdk/encryption';constencryptionHandler=newEncryptionHandler({encryptionImplementations: [/* array of encryption implementations */ ],});
Parameters
config
TypeEncryptionHandlerConfig
The configuration object required to initialize the EncryptionHandler.
config.encryptionImplementations
TypeEncryption[]
An array of encryption implementations. Each implementation provides the necessary methods to encrypt and decrypt data.