class Key

Key helpers.

Methods

static string
encode(string $key)

Converts a binary key into its hexadecimal representation.

static string
decode(string $key)

Converts a hexadecimal key into its binary representation.

static string
generate(int $length = 32)

Generates a key.

static string
generateEncoded(int $length = 32)

Generates a hex encoded key.

Details

at line 27
static string encode(string $key)

Converts a binary key into its hexadecimal representation.

Parameters

string $key Binary key

Return Value

string

at line 38
static string decode(string $key)

Converts a hexadecimal key into its binary representation.

Parameters

string $key Encoded key

Return Value

string

at line 54
static string generate(int $length = 32)

Generates a key.

Parameters

int $length Key length

Return Value

string

at line 65
static string generateEncoded(int $length = 32)

Generates a hex encoded key.

Parameters

int $length Key length

Return Value

string