Skip to content

BCMathService

Properties

alphabet

protected string $alphabet

base

protected int $base

Methods

__construct

Constructor

public __construct(string $alphabet = null): mixed

Parameters:

Parameter Type Description
$alphabet string optional

encode

Encode a string into base58.

public encode(string $string): string

Parameters:

Parameter Type Description
$string string The string you wish to encode.

Return Value:

The Base58 encoded string.


decode

Decode base58 into a PHP string.

public decode(string $base58): string

Parameters:

Parameter Type Description
$base58 string The base58 encoded string.

Return Value:

Returns the decoded string.



Automatically generated on 2025-03-18