Module encoding.base32 stdlib

encoding.base32
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
0
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

This section is empty.

Imported by

This section is empty.

Aliases

This section is empty.

Constants

#constant std_padding

std_padding  = `=` // Standard padding character

#constant no_padding

no_padding   = u8(-1) // No padding

#constant std_alphabet

std_alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'.bytes()

#constant hex_alphabet

hex_alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUV'.bytes()

Sum types

This section is empty.

Functions

#fn decode

fn decode(src []u8) ![]u8

decode decodes a byte array src using Base32 and returns the decoded bytes or a corrupt_input_error_msg error.

#fn decode_string_to_string

fn decode_string_to_string(src string) !string

decode_string_to_string decodes a V string src using Base32 and returns the decoded string or a corrupt_input_error_msg error.

#fn decode_to_string

fn decode_to_string(src []u8) !string

decode_to_string decodes a byte array src using Base32 and returns the decoded string or a corrupt_input_error_msg error.

#fn encode

fn encode(src []u8) []u8

encode encodes a byte array src using Base32 and returns the encoded bytes.

#fn encode_string_to_string

fn encode_string_to_string(src string) string

encode_string_to_string encodes the V string src using Base32 and returns the encoded bytes as a V string.

#fn encode_to_string

fn encode_to_string(src []u8) string

encode_to_string encodes a byte array src using Base32 and returns the encoded bytes as a V string.

#fn new_encoding

fn new_encoding(alphabet []u8) Encoding

new_encoding returns a Base32 Encoding with standard alphabets and standard padding.

#fn new_encoding_with_padding

fn new_encoding_with_padding(alphabet []u8, padding_char u8) Encoding

new_encoding_with_padding returns a Base32 Encoding with specified encoding alphabets and a specified padding_char.

The padding_char must not be '\r' or '\n', must not be contained in the Encoding's alphabet and must be a rune equal or below '\xff'.

#fn new_std_encoding

fn new_std_encoding() Encoding

new_std_encoding creates a standard Base32 Encoding as defined in RFC 4648.

#fn new_std_encoding_with_padding

fn new_std_encoding_with_padding(padding u8) Encoding

new_std_encoding creates a standard Base32 Encoding identical to new_std_encoding but with a specified character padding, or no_padding to disable padding.

The padding character must not be '\r' or '\n', must not be contained in the Encoding's alphabet and must be a rune equal or below '\xff'.

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.