class BigNumberConverter implements NumberConverterInterface (View source)

BigNumberConverter converts UUIDs from hexadecimal characters into moontoast/math BigNumber representations of integers and vice versa

Methods

mixed
fromHex(string $hex)

Converts a hexadecimal number into a Moontoast\Math\BigNumber representation

string
toHex(mixed $integer)

Converts an integer or Moontoast\Math\BigNumber integer representation into a hexadecimal string representation

Details

mixed fromHex(string $hex)

Converts a hexadecimal number into a Moontoast\Math\BigNumber representation

Parameters

string $hex The hexadecimal string representation to convert

Return Value

mixed

string toHex(mixed $integer)

Converts an integer or Moontoast\Math\BigNumber integer representation into a hexadecimal string representation

Parameters

mixed $integer An integer representation to convert; this may be a true integer, a string integer, or a object representation that this converter can understand

Return Value

string Hexadecimal string