Common Lisp Package: CL-BASE32

This package implements the base32 encoding/decoding defined in RF 4648.

README:

FUNCTION

Public

BASE32-TO-BYTES (BASE32-STRING)

Return the bytes decoded from the supplied base32 string

BYTES-TO-BASE32 (SOME-BYTES)

Return a base32 string encoding of the provided vector of bytes

Private

BASE32-LENGTH-FROM-BYTES (SOME-BYTES)

Given bytes of unencoded data, determine the length of the corresponding base32-encoded string

BYTE-LENGTH-FROM-BASE32 (BASE32-STRING)

Given a base32 string, compute the number of bytes in the decoded data

DECODE-WORD (A-DIGIT)

Return the word encoded as a digit in the base32 alphabet

ENCODE-WORD (A-WORD)

Return the digit in the base32 alphabet corresponding to a word

READ-WORD (SOME-BYTES WORD-INDEX)

Return the word (a 5-bit integer) found in some-bytes located at word-index

UNPADDED-BASE32-LENGTH (BASE32-STRING)

Given a base32 string, compute the size of the raw base32 string, without any = padding

WRITE-WORD (SOME-BYTES WORD-INDEX WORD)

Write the word into the bits located at word-index in some-bytes

VARIABLE

Private

Undocumented

*BASE32-ALPHABET*