cabal-version:       2.2
name:                base-encoding
version:             0.2.0.0

synopsis:            Binary-to-text encodings (e.g. base64)
license:             BSD-3-Clause
license-file:        LICENSE
author:              Herbert Valerio Riedel
bug-reports:         https://github.com/hvr/base-encoding/issues
maintainer:          hvr@gnu.org
category:            Codec, Text
description:
  This package provides a simple and convenient API to encode and
  decode binary data in the popular binary-to-text \"base\" encoding
  family as described in [RFC 4648](https://tools.ietf.org/html/rfc4648) et al.
  .
  Currently, the following encodings are supported:
  .
  - (unpadded) @base16@ (RFC4648)
  - (padded) @base64@ (RFC4648)
  - padded @base64url@ (RFC4648)
  - unpadded @base64url@ (RFC4648)
  .

extra-source-files: ChangeLog.md

source-repository head
  type:     git
  location: https://github.com/hvr/base-encoding

library
  hs-source-dirs:      src

  exposed-modules:
    Codec.Base16
    Codec.Base64
    Codec.Base64Url
    Codec.Base64Url.Unpadded

  other-modules:
    Internal

  default-language:    Haskell2010
  other-extensions:    CPP MultiParamTypeClasses

  if impl(ghc >= 7.4)
    default-extensions: Trustworthy
    if impl(ghc >= 7.10)
      ghc-options: -fno-warn-trustworthy-safe

  build-depends:
    , base                >=4.3      && <4.15
    , base16-bytestring  ^>=0.1.1.6
    , base64-bytestring  ^>=1.1.0.0

    , bytestring         ^>=0.9.1 || ^>= 0.10.0
    , text               ^>=1.2.3

  ghc-options: -Wall