Copyright | (c) Sam Truzjan 2013 Oscoin Engineering Team 2019 |
---|---|
License | BSD3 |
Maintainer | pxqr.sta@gmail.com |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Efficient encoding and decoding of base32 encoded bytestring according to RFC 4648. http://tools.ietf.org/html/rfc4648
This module recommended to be imported as
import Data.ByteString.Base32.Z as Base32
to avoid name clashes
with Data.Binary
or Data.ByteString.Base64
modules.
Synopsis
- type Base32 = ByteString
- encode :: ByteString -> Base32
- decode :: Base32 -> Either String ByteString
- decodeLenient :: Base32 -> Either String ByteString
- encTable :: EncTable
- decTable :: ByteString
Documentation
type Base32 = ByteString Source #
Base32 encoded bytestring.
encode :: ByteString -> Base32 Source #
Encode an arbitrary bytestring into (upper case) base32 form.
decode :: Base32 -> Either String ByteString Source #
Decode a base32 encoded bytestring. This functions is case-insensitive and do not require correct padding.
decodeLenient :: Base32 -> Either String ByteString Source #
The same as decode
but with additional leniency: decodeLenient
will skip non-alphabet characters.