Skip to main content

EncryptionClient

Represents a client for interacting with the Bloock Encryption service.

  • Full name: \Bloock\Client\EncryptionClient

Properties

bridge

private $bridge

config

private $config

Methods

__construct

Creates a new instance of the EncryptionClient with the provided configuration.

public __construct(\Bloock\ConfigData|null $config = null): mixed

Parameters:

ParameterTypeDescription
$config\Bloock\ConfigData|null

generateRsaKeyPair

GenerateRsaKeyPair generates an RSA key pair for encryption.

public generateRsaKeyPair(): \Bloock\Entity\Key\RsaKeyPair
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

encrypt

Encrypts a Bloock record using the specified encrypter.

public encrypt(\Bloock\Entity\Record\Record $record, \Bloock\Entity\Encryption\Encrypter $encrypter): \Bloock\Entity\Record\Record

Parameters:

ParameterTypeDescription
$record\Bloock\Entity\Record\Record
$encrypter\Bloock\Entity\Encryption\Encrypter

Throws:


decrypt

Decrypts a Bloock record using the specified decrypter.

public decrypt(\Bloock\Entity\Record\Record $record, \Bloock\Entity\Encryption\Encrypter $decrypter): \Bloock\Entity\Record\Record

Parameters:

ParameterTypeDescription
$record\Bloock\Entity\Record\Record
$decrypter\Bloock\Entity\Encryption\Encrypter

Throws:


getEncryptionAlg

Gets the encryption algorithm used for a Bloock record.

public getEncryptionAlg(\Bloock\Entity\Record\Record $record): string

Parameters:

ParameterTypeDescription
$record\Bloock\Entity\Record\Record

Throws:



Automatically generated on 2024-04-02