From 0cd874d10cd29a5b203268c2b5fcdd214cb91d13 Mon Sep 17 00:00:00 2001 From: Sam T Date: Thu, 26 Sep 2013 23:58:54 +0400 Subject: Add stubs for base32hex codec --- TODO.org | 1 + base32-bytestring.cabal | 1 + src/Data/ByteString/Base32/Hex.hs | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 src/Data/ByteString/Base32/Hex.hs diff --git a/TODO.org b/TODO.org index 85a0671..f064b06 100644 --- a/TODO.org +++ b/TODO.org @@ -1,2 +1,3 @@ * TODO base32hex +* TODO coverage * TODO lazy bytestrings diff --git a/base32-bytestring.cabal b/base32-bytestring.cabal index 98e50e4..45b006f 100644 --- a/base32-bytestring.cabal +++ b/base32-bytestring.cabal @@ -30,6 +30,7 @@ library default-extensions: hs-source-dirs: src exposed-modules: Data.ByteString.Base32 + , Data.ByteString.Base32.Hex other-modules: Data.ByteString.Base32.Internal build-depends: base == 4.6.* , bytestring == 0.10.* diff --git a/src/Data/ByteString/Base32/Hex.hs b/src/Data/ByteString/Base32/Hex.hs new file mode 100644 index 0000000..dad222f --- /dev/null +++ b/src/Data/ByteString/Base32/Hex.hs @@ -0,0 +1,33 @@ +-- | +-- Copyright : (c) Sam Truzjan 2013 +-- License : BSD3 +-- Maintainer : pxqr.sta@gmail.com +-- Stability : stable +-- Portability : portable +-- +-- Efficient encoding and decoding of base32hex encoded bytestring +-- according to RFC 4648. +-- +-- This module recommended to be imported as @import +-- Data.ByteString.Base32.Hex as Base32Hex@ to avoid name clashes +-- with @Data.ByteString.Base32@. +-- +module Data.ByteString.Base32.Hex + ( encode + , decode + , decodeLenient + ) where + +import Data.ByteString as BS + + +-- | Encode a bytestring into base32hex form. +encode :: ByteString -> ByteString +encode = undefined + +-- | Decode a base32hex encoded bytestring. +decode :: ByteString -> ByteString +decode = undefined + +decodeLenient :: ByteString -> ByteString +decodeLenient = undefined \ No newline at end of file -- cgit v1.2.3