final class Base32 (View source)

internal  
 

Encodes canonical unpadded Base32 and accepts human-entered Base32 formatting on input.

Constants

private ALPHABET

Methods

string
encode(string $bytes)

Produces the unpadded canonical Base32 form for arbitrary binary bytes.

string
string
decode(string $value)

Decodes a formatted Base32 value and rejects non-canonical trailing bits.

string

Details

encode

string encode(string $bytes)

Produces the unpadded canonical Base32 form for arbitrary binary bytes.

Parameters

string $bytes

Return Value

string

decode

string decode(string $value)

Decodes a formatted Base32 value and rejects non-canonical trailing bits.

Parameters

string $value

Return Value

string

Exceptions

InvalidTotpSecretException