| Copyright | (c) 2026 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.ByteString.Base64
Description
Pure base64 encoding and decoding of strict bytestrings.
Synopsis
- encode :: ByteString -> ByteString
- decode :: ByteString -> Maybe ByteString
Documentation
encode :: ByteString -> ByteString Source #
Encode a base256 ByteString as base64.
Uses ARM NEON extensions when available, otherwise a pure Haskell scalar loop.
>>>encode "hello world""aGVsbG8gd29ybGQ="
decode :: ByteString -> Maybe ByteString Source #
Decode a base64 ByteString to base256.
Uses ARM NEON extensions when available, otherwise a pure
Haskell scalar loop. Invalid inputs (including incorrectly-
padded or non-canonical inputs) will produce Nothing.
>>>decode "aGVsbG8gd29ybGQ="Just "hello world">>>decode "aGVsbG8gd29ybGQ" -- missing paddingNothing