Base32
in package
Class Base32
Table of Contents
Properties
- $base32Chars : string
- $base32Lookup : array<string|int, mixed>
Methods
Properties
$base32Chars
protected
static string
$base32Chars
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'
$base32Lookup
protected
static array<string|int, mixed>
$base32Lookup
= [
0xff,
0xff,
0x1a,
0x1b,
0x1c,
0x1d,
0x1e,
0x1f,
// '0', '1', '2', '3', '4', '5', '6', '7'
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
0xff,
// '8', '9', ':', ';', '<', '=', '>', '?'
0xff,
0x0,
0x1,
0x2,
0x3,
0x4,
0x5,
0x6,
// '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G'
0x7,
0x8,
0x9,
0xa,
0xb,
0xc,
0xd,
0xe,
// 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'
0xf,
0x10,
0x11,
0x12,
0x13,
0x14,
0x15,
0x16,
// 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W'
0x17,
0x18,
0x19,
0xff,
0xff,
0xff,
0xff,
0xff,
// 'X', 'Y', 'Z', '[', '\', ']', '^', '_'
0xff,
0x0,
0x1,
0x2,
0x3,
0x4,
0x5,
0x6,
// '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g'
0x7,
0x8,
0x9,
0xa,
0xb,
0xc,
0xd,
0xe,
// 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'
0xf,
0x10,
0x11,
0x12,
0x13,
0x14,
0x15,
0x16,
// 'p', 'q', 'r', 's', 't', 'u', 'v', 'w'
0x17,
0x18,
0x19,
0xff,
0xff,
0xff,
0xff,
0xff,
]
Methods
decode()
Decode in Base32
public
static decode(string $base32) : string
Parameters
- $base32 : string
Return values
stringencode()
Encode in Base32
public
static encode(string $bytes) : string
Parameters
- $bytes : string