diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-09-26 23:58:54 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-09-26 23:58:54 +0400 |
commit | 0cd874d10cd29a5b203268c2b5fcdd214cb91d13 (patch) | |
tree | 761cccf96a6499c66ddb14df3aa4cc833f1579bb | |
parent | a34bc4269a11165ec9c05a0f5e55ba2800764b0f (diff) |
Add stubs for base32hex codec
-rw-r--r-- | TODO.org | 1 | ||||
-rw-r--r-- | base32-bytestring.cabal | 1 | ||||
-rw-r--r-- | src/Data/ByteString/Base32/Hex.hs | 33 |
3 files changed, 35 insertions, 0 deletions
@@ -1,2 +1,3 @@ | |||
1 | * TODO base32hex | 1 | * TODO base32hex |
2 | * TODO coverage | ||
2 | * TODO lazy bytestrings | 3 | * 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 | |||
30 | default-extensions: | 30 | default-extensions: |
31 | hs-source-dirs: src | 31 | hs-source-dirs: src |
32 | exposed-modules: Data.ByteString.Base32 | 32 | exposed-modules: Data.ByteString.Base32 |
33 | , Data.ByteString.Base32.Hex | ||
33 | other-modules: Data.ByteString.Base32.Internal | 34 | other-modules: Data.ByteString.Base32.Internal |
34 | build-depends: base == 4.6.* | 35 | build-depends: base == 4.6.* |
35 | , bytestring == 0.10.* | 36 | , 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 @@ | |||
1 | -- | | ||
2 | -- Copyright : (c) Sam Truzjan 2013 | ||
3 | -- License : BSD3 | ||
4 | -- Maintainer : pxqr.sta@gmail.com | ||
5 | -- Stability : stable | ||
6 | -- Portability : portable | ||
7 | -- | ||
8 | -- Efficient encoding and decoding of base32hex encoded bytestring | ||
9 | -- according to RFC 4648. <http://tools.ietf.org/html/rfc4648> | ||
10 | -- | ||
11 | -- This module recommended to be imported as @import | ||
12 | -- Data.ByteString.Base32.Hex as Base32Hex@ to avoid name clashes | ||
13 | -- with @Data.ByteString.Base32@. | ||
14 | -- | ||
15 | module Data.ByteString.Base32.Hex | ||
16 | ( encode | ||
17 | , decode | ||
18 | , decodeLenient | ||
19 | ) where | ||
20 | |||
21 | import Data.ByteString as BS | ||
22 | |||
23 | |||
24 | -- | Encode a bytestring into base32hex form. | ||
25 | encode :: ByteString -> ByteString | ||
26 | encode = undefined | ||
27 | |||
28 | -- | Decode a base32hex encoded bytestring. | ||
29 | decode :: ByteString -> ByteString | ||
30 | decode = undefined | ||
31 | |||
32 | decodeLenient :: ByteString -> ByteString | ||
33 | decodeLenient = undefined \ No newline at end of file | ||