Copyright | (c) 2024 Jared Tobin |
---|---|
License | MIT |
Maintainer | Jared Tobin <jared@ppad.tech> |
Safe Haskell | None |
Language | Haskell2010 |
Data.ByteString.Base58
Description
base58 encoding and decoding of strict bytestrings.
Synopsis
- encode :: ByteString -> ByteString
- decode :: ByteString -> Maybe ByteString
Documentation
encode :: ByteString -> ByteString Source #
Encode a base256 ByteString
as base58.
>>>
encode "hello world"
"StV1DL6CwTryKyV"
decode :: ByteString -> Maybe ByteString Source #
Decode a base58 ByteString
to base256.
Invalid inputs will produce Nothing
.
>>>
decode "StV1DL6CwTryKyV"
Just "hello world">>>
decode "StV1DL0CwTryKyV" -- s/6/0
Nothing