| Copyright | (c) 2024 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.ByteString.Base32
Contents
Description
Unpadded base32 encoding & decoding using the bech32 character set.
Synopsis
- encode :: ByteString -> ByteString
- decode :: ByteString -> Maybe ByteString
base32 encoding and decoding
Arguments
| :: ByteString | base256-encoded bytestring |
| -> ByteString | base32-encoded bytestring |
Encode a base256-encoded ByteString as a base32-encoded
ByteString, using the bech32 character set.
>>>encode "jtobin was here!""df6x7cnfdcs8wctnyp5x2un9yy"
Arguments
| :: ByteString | base32-encoded bytestring |
| -> Maybe ByteString | base256-encoded bytestring |
Decode a ByteString, encoded as base32 using the bech32 character
set, to a base256-encoded ByteString.
>>>decode "df6x7cnfdcs8wctnyp5x2un9yy"Just "jtobin was here!">>>decode "dfOx7cnfdcs8wctnyp5x2un9yy" -- s/6/O (non-bech32 character)Nothing