@bloock/sdk / EncryptionClient
Class: EncryptionClient
Represents a client for interacting with the Bloock Encryption service.
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new EncryptionClient(configData?
): EncryptionClient
Creates a new instance of the EncryptionClient with default configuration.
Parameters
Name | Type |
---|---|
configData? | ConfigData |
Returns
Defined in
Properties
bridge
• Private
bridge: BloockBridge
Defined in
configData
• Private
configData: ConfigData
Defined in
Methods
decrypt
▸ decrypt(record
, decrypter
): Promise
<Record
>
Decrypts a Bloock record using the specified decrypter.
Parameters
Name | Type |
---|---|
record | Record |
decrypter | Encrypter |
Returns
Promise
<Record
>
Defined in
encrypt
▸ encrypt(record
, encrypter
): Promise
<Record
>
Encrypts a Bloock record using the specified encrypter.
Parameters
Name | Type |
---|---|
record | Record |
encrypter | Encrypter |
Returns
Promise
<Record
>
Defined in
generateRsaKeyPair
▸ generateRsaKeyPair(): Promise
<KeyPair
>
GenerateRsaKeyPair generates an RSA key pair for encryption.
Returns
Promise
<KeyPair
>
An object containing both the public and the private key
Deprecated
Will be deleted in future versions. Use KeyClient.newLocalKey function instead.
Defined in
getEncryptionAlg
▸ getEncryptionAlg(record
): Promise
<EncryptionAlg
>
Gets the encryption algorithm used for a Bloock record.
Parameters
Name | Type |
---|---|
record | Record |
Returns
Promise
<EncryptionAlg
>