class BaseEncryption

Class BaseEncryption

Constants

METHOD

Properties

static protected bool|string $key

Methods

__construct()

BaseEncryption constructor.

static string
encrypt(string $message, string $key = null, boolean $encode = false)

Encrypts (but does not authenticate) a message

static string
decrypt(string $message, mixed|null $key = null, bool $encoded = false)

No description

Details

at line 31
__construct()

BaseEncryption constructor.

at line 45
static string encrypt(string $message, string $key = null, boolean $encode = false)

Encrypts (but does not authenticate) a message

Parameters

string $message
  • plaintext message
string $key
  • encryption key (raw binary expected)
boolean $encode
  • set to TRUE to return a base64-encoded

Return Value

string (raw binary)

at line 76
static string decrypt(string $message, mixed|null $key = null, bool $encoded = false)

Parameters

string $message
mixed|null $key
bool $encoded

Return Value

string

Exceptions

Exception