Decoder
in package
Decoder class for handling the RLP decoding process. Operates on binary data internally. Expects the RLP data to be well-formed or will throw EthBinderLogicException
Tags
Table of Contents
Properties
Methods
- decodeRLPBin() : array<string|int, mixed>
- Decodes RLP-encoded data provided in binary form. It wraps output in array.
- decodeRLPHex() : array<string|int, mixed>
- Decodes RLP-encoded data provided in hexadecimal form. It wraps output in array.
- __construct() : mixed
- decode() : array<string|int, mixed>
- decodeArray() : array<string|int, mixed>
- decodeEntry() : array<string|int, mixed>|string
- getByte() : int
- getByteStr() : string
Properties
$dataBin
private
string
$dataBin
$pointer
private
int
$pointer
Methods
decodeRLPBin()
Decodes RLP-encoded data provided in binary form. It wraps output in array.
public
static decodeRLPBin(string $bin) : array<string|int, mixed>
Parameters
- $bin : string
-
Binary RLP-encoded data.
Tags
Return values
array<string|int, mixed> —Decoded data, presented as an array.
decodeRLPHex()
Decodes RLP-encoded data provided in hexadecimal form. It wraps output in array.
public
static decodeRLPHex(string $hex) : array<string|int, mixed>
Parameters
- $hex : string
-
Hexadecimal RLP-encoded data.
Tags
Return values
array<string|int, mixed> —Decoded data, presented as an array.
__construct()
protected
__construct(string $dataBin) : mixed
Parameters
- $dataBin : string
decode()
protected
decode() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>decodeArray()
protected
decodeArray(int $size) : array<string|int, mixed>
Parameters
- $size : int
Tags
Return values
array<string|int, mixed>decodeEntry()
protected
decodeEntry() : array<string|int, mixed>|string
Tags
Return values
array<string|int, mixed>|stringgetByte()
protected
getByte([int $len = 1 ]) : int
Parameters
- $len : int = 1
Tags
Return values
intgetByteStr()
protected
getByteStr(int $len) : string
Parameters
- $len : int