Module encoding.base58 stdlib

encoding.base58
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
1
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

  • Standard Library

Imported by

This section is empty.

Aliases

This section is empty.

Constants

#constant btc_alphabet

pub const btc_alphabet = new_alphabet('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz') or {
	panic(impossible)
}

#constant flickr_alphabet

pub const flickr_alphabet = new_alphabet('123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ') or {
	panic(impossible)
}

#constant ripple_alphabet

pub const ripple_alphabet = new_alphabet('rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz') or {
	panic(impossible)
}

#constant alphabets

pub const alphabets = {
	'btc':    btc_alphabet
	'flickr': flickr_alphabet
	'ripple': ripple_alphabet
}

alphabets is a map of common base58 alphabets:

Sum types

This section is empty.

Functions

#fn decode

fn decode(str string) !string

decode decodes the base58 input string, using the Bitcoin alphabet

#fn decode_bytes

fn decode_bytes(input []u8) ![]u8

decode_bytes decodes the base58 encoded input array, using the Bitcoin alphabet

#fn decode_int

fn decode_int(input string) !int

decode_int decodes base58 string to an integer with Bitcoin alphabet

#fn decode_int_walpha

fn decode_int_walpha(input string, alphabet Alphabet) !int

decode_int_walpha decodes base58 string to an integer with custom alphabet

#fn decode_walpha

fn decode_walpha(input string, alphabet Alphabet) !string

decode_walpha decodes the base58 encoded input string, using custom alphabet

#fn decode_walpha_bytes

fn decode_walpha_bytes(input []u8, alphabet Alphabet) ![]u8

decode_walpha_bytes decodes the base58 encoded input array using a custom alphabet

#fn encode

fn encode(input string) string

encode encodes the input string to base58 with the Bitcoin alphabet

#fn encode_bytes

fn encode_bytes(input []u8) []u8

encode_bytes encodes the input array to base58, with the Bitcoin alphabet

#fn encode_int

fn encode_int(input int) !string

encode_int encodes any integer type to base58 string with Bitcoin alphabet

#fn encode_int_walpha

fn encode_int_walpha(input int, alphabet Alphabet) !string

encode_int_walpha any integer type to base58 string with custom alphabet

#fn encode_walpha

fn encode_walpha(input string, alphabet Alphabet) string

encode_walpha encodes the input string to base58 with a custom aplhabet

#fn encode_walpha_bytes

fn encode_walpha_bytes(input []u8, alphabet Alphabet) []u8

encode_walpha encodes the input array to base58 with a custom aplhabet

#fn new_alphabet

fn new_alphabet(str string) !Alphabet

new_alphabet instantiates an Alphabet object based on the provided characters

Structs

This section is empty.

Interfaces

This section is empty.

Enums

This section is empty.