base64: A modern RFC 4648-compliant Base64 library

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

RFC 4648-compliant Base64 with an eye towards performance and modernity (additional support for RFC 7049 standards)


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1.0, 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.4.0, 0.4.1, 0.4.2, 0.4.2.1, 0.4.2.2, 0.4.2.3, 0.4.2.4, 1.0 (info)
Change log CHANGELOG.md
Dependencies base (>=4.14 && <4.20), bytestring (>=0.10 && <0.13), deepseq (>=1.4.3.0 && <1.6), text (>=1.2 && <1.3 || >=2.0 && <2.2), text-short (>=0.1 && <0.2) [details]
Tested with ghc ==8.10.7 || ==9.0.2 || ==9.2.4 || ==9.4.1 || ==9.6.1
License BSD-3-Clause
Copyright (c) 2019-2022 Emily Pillmore
Author Emily Pillmore
Maintainer emilypi@cohomolo.gy
Revised Revision 4 made by topos at 2023-11-05T02:39:42Z
Category Data
Home page https://github.com/emilypi/base64
Bug tracker https://github.com/emilypi/base64/issues
Source repo head: git clone https://github.com/emilypi/base64.git
Uploaded by topos at 2022-03-28T18:39:06Z
Distributions Arch:0.4.2.4, Fedora:0.4.2.4, LTSHaskell:0.4.2.4, NixOS:0.4.2.4, Stackage:1.0
Reverse Dependencies 29 direct, 203 indirect [details]
Downloads 19825 total (316 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-03-28 [all 1 reports]

Readme for base64-0.4.2.4

[back to package description]

Base64

Build Status Hackage

Base64 encoding and decodings.

For the companion optics and pattern synonyms, see base64-lens.

Summary

The following types are supported for both std, padded url-safe, and unpadded url-safe alphabets:

  • Data.ByteString
  • Data.ByteString.Lazy
  • Data.ByteString.Short
  • Data.Text
  • Data.Text.Lazy
  • Data.Text.Short

Additionally this library has

  • Better performance than base64-bytestring for encode and decode.
  • Optics for handling more complex structures with Base64 representations via the base64-lens package
  • Checks for both validity and correctness of Base64 and Base64url encodings
  • Rejects non-canonical encodings that do not roundtrip in other base64 libraries like ZE==.

There are no dependencies aside from those bundled with GHC, text-short, and the ghc-byteorder re-export.