base64 1.0 → 1.0.1
raw patch · 28 files changed
+54/−40 lines, 28 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Base64.Types: assertBase64 :: forall k a. a -> Base64 k a
+ Data.Base64.Types: assertBase64 :: forall (k :: Alphabet) a. a -> Base64 k a
- Data.Base64.Types: coerceBase64 :: forall j k a. Base64 k a -> Base64 j a
+ Data.Base64.Types: coerceBase64 :: forall (j :: Alphabet) (k :: Alphabet) a. Base64 k a -> Base64 j a
- Data.Base64.Types: extractBase64 :: Base64 k a -> a
+ Data.Base64.Types: extractBase64 :: forall (k :: Alphabet) a. Base64 k a -> a
- Data.Base64.Types: type family NonStandardAlphabet k :: Constraint
+ Data.Base64.Types: type family NonStandardAlphabet (k :: Alphabet)
- Data.ByteString.Base64: decodeBase64 :: StdAlphabet k => Base64 k ByteString -> ByteString
+ Data.ByteString.Base64: decodeBase64 :: forall (k :: Alphabet). StdAlphabet k => Base64 k ByteString -> ByteString
- Data.ByteString.Base64.URL: decodeBase64 :: UrlAlphabet k => Base64 k ByteString -> ByteString
+ Data.ByteString.Base64.URL: decodeBase64 :: forall (k :: Alphabet). UrlAlphabet k => Base64 k ByteString -> ByteString
- Data.ByteString.Lazy.Base64: decodeBase64 :: StdAlphabet k => Base64 k ByteString -> ByteString
+ Data.ByteString.Lazy.Base64: decodeBase64 :: forall (k :: Alphabet). StdAlphabet k => Base64 k ByteString -> ByteString
- Data.ByteString.Lazy.Base64.URL: decodeBase64 :: UrlAlphabet k => Base64 k ByteString -> ByteString
+ Data.ByteString.Lazy.Base64.URL: decodeBase64 :: forall (k :: Alphabet). UrlAlphabet k => Base64 k ByteString -> ByteString
- Data.ByteString.Short.Base64: decodeBase64 :: StdAlphabet k => Base64 k ShortByteString -> ShortByteString
+ Data.ByteString.Short.Base64: decodeBase64 :: forall (k :: Alphabet). StdAlphabet k => Base64 k ShortByteString -> ShortByteString
- Data.ByteString.Short.Base64.URL: decodeBase64 :: UrlAlphabet k => Base64 k ShortByteString -> ShortByteString
+ Data.ByteString.Short.Base64.URL: decodeBase64 :: forall (k :: Alphabet). UrlAlphabet k => Base64 k ShortByteString -> ShortByteString
- Data.Text.Encoding.Base64: decodeBase64 :: StdAlphabet k => Base64 k Text -> Text
+ Data.Text.Encoding.Base64: decodeBase64 :: forall (k :: Alphabet). StdAlphabet k => Base64 k Text -> Text
- Data.Text.Encoding.Base64.URL: decodeBase64 :: UrlAlphabet k => Base64 k Text -> Text
+ Data.Text.Encoding.Base64.URL: decodeBase64 :: forall (k :: Alphabet). UrlAlphabet k => Base64 k Text -> Text
- Data.Text.Lazy.Encoding.Base64: decodeBase64 :: StdAlphabet k => Base64 k Text -> Text
+ Data.Text.Lazy.Encoding.Base64: decodeBase64 :: forall (k :: Alphabet). StdAlphabet k => Base64 k Text -> Text
- Data.Text.Lazy.Encoding.Base64.URL: decodeBase64 :: UrlAlphabet k => Base64 k Text -> Text
+ Data.Text.Lazy.Encoding.Base64.URL: decodeBase64 :: forall (k :: Alphabet). UrlAlphabet k => Base64 k Text -> Text
- Data.Text.Short.Encoding.Base64: decodeBase64 :: StdAlphabet k => Base64 k ShortText -> ShortText
+ Data.Text.Short.Encoding.Base64: decodeBase64 :: forall (k :: Alphabet). StdAlphabet k => Base64 k ShortText -> ShortText
- Data.Text.Short.Encoding.Base64.URL: decodeBase64 :: UrlAlphabet k => Base64 k ShortText -> ShortText
+ Data.Text.Short.Encoding.Base64.URL: decodeBase64 :: forall (k :: Alphabet). UrlAlphabet k => Base64 k ShortText -> ShortText
Files
- CHANGELOG.md +10/−2
- LICENSE +1/−1
- README.md +2/−1
- base64.cabal +7/−7
- src/Data/Base64/Types.hs +2/−3
- src/Data/Base64/Types/Internal.hs +10/−4
- src/Data/ByteString/Base64.hs +1/−1
- src/Data/ByteString/Base64/Internal.hs +1/−1
- src/Data/ByteString/Base64/Internal/Head.hs +1/−1
- src/Data/ByteString/Base64/Internal/Tables.hs +1/−1
- src/Data/ByteString/Base64/Internal/Tail.hs +1/−1
- src/Data/ByteString/Base64/Internal/Utils.hs +1/−1
- src/Data/ByteString/Base64/Internal/W16/Loop.hs +1/−1
- src/Data/ByteString/Base64/Internal/W64/Loop.hs +1/−1
- src/Data/ByteString/Base64/URL.hs +1/−1
- src/Data/ByteString/Lazy/Base64.hs +1/−1
- src/Data/ByteString/Lazy/Base64/URL.hs +1/−1
- src/Data/ByteString/Short/Base64.hs +1/−1
- src/Data/ByteString/Short/Base64/URL.hs +1/−1
- src/Data/Text/Encoding/Base64.hs +1/−1
- src/Data/Text/Encoding/Base64/Error.hs +1/−1
- src/Data/Text/Encoding/Base64/URL.hs +1/−1
- src/Data/Text/Lazy/Encoding/Base64.hs +1/−1
- src/Data/Text/Lazy/Encoding/Base64/URL.hs +1/−1
- src/Data/Text/Short/Encoding/Base64.hs +1/−1
- src/Data/Text/Short/Encoding/Base64/URL.hs +1/−1
- test/Internal.hs +1/−1
- test/Main.hs +1/−1
CHANGELOG.md view
@@ -1,8 +1,16 @@ # Revision history for base64 -## 1.0.0.0+## 1.0.1 -New epoch time! lots of changes to the API. Please see MIGRATION.md for more info:+* Support GHC 9.6 through 9.14, including `base-4.22`.+* Require GHC 9.6 or later (`base >= 4.18`) and `bytestring >= 0.11`.+* Refresh CI for current stable GHC releases and GitHub Actions; retire the i386 CI job.+* Update maintainer metadata and copyright notices through 2026.+* No changes to the public API.++## 1.0++New epoch time! lots of changes to the API. Please see [MIGRATION-1.0.md](MIGRATION-1.0.md) for more info: * Add support for GHC 9.x * Bumped bounds to more modern dependency set
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2019, Emily Pillmore+Copyright (c) 2019-2026, Emily Pillmore All rights reserved.
README.md view
@@ -25,4 +25,5 @@ - 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.+The library supports GHC 9.6 through 9.14. Its dependencies are `base`,+`bytestring`, `deepseq`, `text`, and `text-short`.
base64.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: base64-version: 1.0+version: 1.0.1 synopsis: A modern Base64 library description: A performant, featureful RFC 4648 and 7049-compliant Base64 implementation@@ -11,8 +11,7 @@ license-file: LICENSE author: Emily Pillmore maintainer: Emily Pillmore <emilypi@cohomolo.gy>- , Sofia-m-a <https://github.com/sofia-m-a>-copyright: (c) 2019-2023 Emily Pillmore+copyright: (c) 2019-2026 Emily Pillmore category: Data build-type: Simple extra-doc-files:@@ -20,8 +19,9 @@ README.md MIGRATION-1.0.md -tested-with: GHC ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.7 || ==9.6.3 || ==9.8.1+tested-with: GHC ==9.6.7 || ==9.8.4 || ==9.10.3 || ==9.12.4 || ==9.14.1 + source-repository head type: git location: https://github.com/emilypi/base64.git@@ -54,7 +54,7 @@ Data.ByteString.Base64.Internal.W64.Loop build-depends:- base >=4.14 && <4.20+ base >=4.18 && <4.23 , bytestring >=0.11 && <0.13 , deepseq >=1.4.4.0 && <1.6 , text >=2.0 && <2.3@@ -71,7 +71,7 @@ other-modules: Internal main-is: Main.hs build-depends:- base >=4.14 && <4.20+ base >=4.18 && <4.23 , base64 , base64-bytestring , bytestring >=0.11@@ -91,7 +91,7 @@ hs-source-dirs: benchmarks main-is: Base64Bench.hs build-depends:- base >=4.14 && <4.20+ base >=4.18 && <4.23 , base64 , base64-bytestring , bytestring >=0.11
src/Data/Base64/Types.hs view
@@ -5,11 +5,10 @@ {-# language UndecidableInstances #-} -- | -- Module : Data.ByteString.Base64.Types--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style ----- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>,--- sofia-m-a <https://github.com/sofia-m-a>+-- Maintainer : Emily Pillmore <emilypi@cohomolo.gy> -- Stability : stable -- Portability : non-portable --
src/Data/Base64/Types/Internal.hs view
@@ -3,11 +3,10 @@ {-# language TypeFamilies #-} -- | -- Module : Data.ByteString.Base64.Types.Internal--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style ----- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>,--- sofia-m-a <https://github.com/sofia-m-a>+-- Maintainer : Emily Pillmore <emilypi@cohomolo.gy> -- Stability : stable -- Portability : non-portable --@@ -22,7 +21,14 @@ import Control.DeepSeq (NFData, rnf) --- | The different kinds of supported Base64 encodings+-- | The different kinds of supported Base64 encodings. This library supports the encodings defined in +-- [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648) and [RFC 7049](https://datatracker.ietf.org/doc/html/rfc7049).+--+-- [RFC 2045](https://www.ietf.org/rfc/rfc2045.txt) defines a separate Base64 encoding for MIME, which is not supported.+-- This format requires a newline at least every 76 encoded characters, which works around+-- limitations of older email programs that could not handle long lines.+-- Be aware that other languages, such as Ruby, encode the RFC 2045 version+-- by default. To decode their ouput, remove all newlines before decoding. data Alphabet = StdPadded -- ^ Standard base64 according to [RFC 4648 §4](https://datatracker.ietf.org/doc/html/rfc4648#section-4)
src/Data/ByteString/Base64.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Data.ByteString.Base64--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Data.ByteString.Base64.Internal--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal/Head.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Data.ByteString.Base64.Internal.Head--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal/Tables.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE TypeApplications #-} -- | -- Module : Data.ByteString.Base64.Internal.Tables--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal/Tail.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE TypeApplications #-} -- | -- Module : Data.ByteString.Base64.Internal.Tail--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal/Utils.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE MagicHash #-} -- | -- Module : Data.ByteString.Base64.Internal--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal/W16/Loop.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE TypeApplications #-} -- | -- Module : Data.ByteString.Base64.Internal.W16.Loop--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/Internal/W64/Loop.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE BangPatterns #-} -- | -- Module : Data.ByteString.Base64.Internal.W64.Loop--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Base64/URL.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE TypeFamilies #-} -- | -- Module : Data.ByteString.Base64.URL--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Lazy/Base64.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.ByteString.Lazy.Base64--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Lazy/Base64/URL.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE TypeFamilies #-} -- | -- Module : Data.ByteString.Lazy.Base64.URL--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Short/Base64.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.ByteString.Short.Base64--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/ByteString/Short/Base64/URL.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.ByteString.Short.Base64.URL--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Encoding/Base64.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.Text.Encoding.Base64--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Encoding/Base64/Error.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DeriveGeneric #-} -- | -- Module : Data.Text.Encoding.Base64.Error--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Encoding/Base64/URL.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.Text.Encoding.Base64.URL--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Lazy/Encoding/Base64.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.Text.Lazy.Encoding.Base64--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Lazy/Encoding/Base64/URL.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.Text.Lazy.Encoding.Base64.URL--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Short/Encoding/Base64.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.Text.Short.Encoding.Base64--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
src/Data/Text/Short/Encoding/Base64/URL.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Data.Text.Short.Encoding.Base64.URL--- Copyright : (c) 2019-2023 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
test/Internal.hs view
@@ -5,7 +5,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -- | -- Module : Main--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>
test/Main.hs view
@@ -6,7 +6,7 @@ {-# LANGUAGE DataKinds #-} -- | -- Module : Main--- Copyright : (c) 2019-2020 Emily Pillmore+-- Copyright : (c) 2019-2026 Emily Pillmore -- License : BSD-style -- -- Maintainer : Emily Pillmore <emilypi@cohomolo.gy>