package core:encoding/pem
⌘K
Ctrl+K
or
/
Overview
Encodes and decodes PEM formatted data.
Index
Types (3)
Variables (0)
This section is empty.
Procedures (4)
Procedure Groups (0)
This section is empty.
Types
Block ¶
Block is a block of PEM encoded data.
Related Procedures With Parameters
Related Procedures With Returns
Decode_Error ¶
Decode_Error :: enum int { None, Bad_Boundary, // Invalid boundary line. Bad_Label, // Invalid label in BEGIN/END boundary line. Bad_Data, // Invalid base64 data. Label_Mismatch, // Label in END boundary line does not match. Missing_End_Boundary, // End of data without END boundary. }
Constants
Variables
This section is empty.
Procedures
block_bytes ¶
block_bytes returns a slice to the Block's data.
block_delete ¶
block_delete :: proc(blk: ^Block) {…}
block_delete frees a Block returned from decode.
Note: No allocator is specified as decode uses the same allocator for everything.
decode ¶
decode :: proc(data: []u8, allocator := context.allocator) -> (blk: ^Block, remaining: []u8, err: Error) {…}
decode decodes the first encountered PEM block, returning the resulting block, remaining data, and nil iff the process was successful.
Note: No PEM blocks will result in this procedure returning all nils, and is not considered an error.
encode ¶
encode :: proc(label: string, data: []u8, newline: bool = false, allocator := context.allocator) -> (res: []u8, err: runtime.Allocator_Error) #optional_ok {…}
encode encodes the specified label and data into PEM format.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2026-06 (vendor "odin") Windows_amd64 @ 2026-06-07 21:58:31.804950500 +0000 UTC