package core:encoding/base32
⌘K
Ctrl+K
or
/
Overview
Base32 encoding and decoding, as specified in RFC 4648.
A secondary param can be used to supply a custom alphabet to encode and a matching decoding table to decode.
If none is supplied it just uses the standard Base32 alphabet. In case your specific version does not use padding, you may truncate it from the encoded output.
Error represents errors that can occur during base32 decoding operations. As per RFC 4648: Section 3.3: Invalid character handling Section 3.2: Padding requirements Section 6: Base32 encoding specifics (including block size requirements)
Types
Error ¶
Error :: enum int { None, Invalid_Character, // Input contains characters outside the specified alphabet Invalid_Length, // Input length is not valid for base32 (must be a multiple of 8 with proper padding) Malformed_Input, // Input has improper structure (wrong padding position or incomplete groups) }
Related Procedures With Returns
Validate_Proc ¶
Related Procedures With Parameters
Constants
Variables
DEC_TABLE ¶
@(rodata) DEC_TABLE: [256]u8 = …
ENC_TABLE ¶
@(rodata) ENC_TABLE: [32]u8 = …
Procedures
decode ¶
decode :: proc(data: string, DEC_TBL: [256]u8 = DEC_TABLE, validate: Validate_Proc = _validate_default, allocator := context.allocator) -> (out: []u8, err: Error) {…}
encode ¶
encode :: proc(data: []u8, ENC_TBL: [32]u8 = ENC_TABLE, allocator := context.allocator) -> string {…}
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2025-10 (vendor "odin") Windows_amd64 @ 2025-10-28 21:13:04.159858500 +0000 UTC