crockford

package
v0.6.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ENCODING_CHARS = "0123456789abcdefghjkmnpqrstvwxyz"

NO i, l, o or u

Variables

This section is empty.

Functions

func Decode

func Decode(encoded string, checksum bool) (int64, error)

Decode a URI-friendly Douglas Crockford base32 string to a number.

func Encode

func Encode(number int64, splitEvery int, length int, checksum bool) string

Encode a number to a URI-friendly Douglas Crockford base32 string. optionally split with ' -' every n characters, pad with zeros to a minimum length, and append a checksum using modulo 97-10 (ISO 7064).

func Generate

func Generate(length int, splitEvery int, checksum bool) string

Generate a random Cockroft base32 string. optionally split with ' -' every n characters, pad with zeros to a minimum length, and append a checksum using modulo 97-10 (ISO 7064).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL