package core:encoding/base32

⌘K
Ctrl+K
or
/

    Overview

    Base32 encoding/decoding implementation as specified in RFC 4648. More

    Index

    Types (2)
    Constants (1)
    Variables (2)
    Procedures (2)
    Procedure Groups (0)

    This section is empty.

    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)
    }
     

    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)

    Related Procedures With Returns

    Validate_Proc ¶

    Validate_Proc :: proc(c: u8) -> bool
    Related Procedures With Parameters

    Constants

    PADDING ¶

    PADDING :: '='

    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-01 (vendor "odin") Windows_amd64 @ 2025-01-20 21:11:03.400781500 +0000 UTC