Portability | portable |
---|---|
Stability | stable |
Maintainer | pxqr.sta@gmail.com |
Safe Haskell | None |
Efficient encoding and decoding of base32hex encoded bytestring according to RFC 4648. http://tools.ietf.org/html/rfc4648
This module recommended to be imported as import
Data.ByteString.Base32.Hex as Base32Hex
to avoid name clashes
with Data.ByteString.Base32
.
- type Base32Hex = BS.ByteString
- encode :: BS.ByteString -> Base32Hex
- decode :: Base32Hex -> Either String BS.ByteString
- decodeLenient :: Base32Hex -> Either String BS.ByteString
Documentation
type Base32Hex = BS.ByteStringSource
Base32Hex encoded bytestring.
encode :: BS.ByteString -> Base32HexSource
Encode an arbitrary bytestring into (upper case) base32hex form.
decode :: Base32Hex -> Either String BS.ByteStringSource
Decode a base32hex encoded bytestring. This functions is case-insensitive and do not requires correct padding.
decodeLenient :: Base32Hex -> Either String BS.ByteStringSource
The same as decode
but with additional leniency: decodeLenient
will skip non-alphabet characters.