Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BaseEncoding
- encodeWith :: BaseEncoding -> ByteString -> Text
- decodeWith :: BaseEncoding -> Text -> Either String ByteString
Documentation
data BaseEncoding Source #
Constructors to indicate the base encodings
NixBase32 | |
Base16 | ^ Nix has a special map of Base32 encoding Placed first, since it determines Haskell optimizations of pattern matches, & NixBase seems be the most widely used in Nix. |
Base64 |
Instances
encodeWith :: BaseEncoding -> ByteString -> Text Source #
Encode ByteString
with Base
encoding, produce Text
.
decodeWith :: BaseEncoding -> Text -> Either String ByteString Source #
Take the input & Base
encoding witness -> decode into Text
.