-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Fast and safe representation of a Base-32 string
--   
--   Provides an interface for converting any object that has a
--   <a>Binary</a> instance to and from a base-32 Text representation.
@package base32string
@version 0.9.1

module Data.Base32String

-- | Represents a Base32 string. Guarantees that all characters it contains
--   are valid base32 characters.
data Base32String

-- | Smart constructor which validates that all the text are actually
--   base-32 characters.
b32String :: ByteString -> ByteString -> Base32String

-- | Case insensitive variant of <a>b32String</a>, which converts all
--   characters to upper case.
b32String' :: ByteString -> ByteString -> Base32String

-- | Converts a <a>Binary</a> to a <a>Base32String</a> value
fromBinary :: Binary a => ByteString -> a -> Base32String

-- | Converts a <a>Base32String</a> to a <a>Binary</a> value
toBinary :: Binary a => ByteString -> Base32String -> a

-- | Reads a <a>ByteString</a> as raw bytes and converts to base32
--   representation. We cannot use the instance Binary of <a>ByteString</a>
--   because it provides a leading length, which is not what we want when
--   dealing with raw bytes.
fromBytes :: ByteString -> ByteString -> Base32String

-- | Access to the raw bytes in a <a>ByteString</a> format.
toBytes :: ByteString -> Base32String -> ByteString

-- | Access to a <a>Text</a> representation of the <a>Base32String</a>
toText :: Base32String -> Text

-- | Converts a <a>Text</a> representation to a <a>Base32String</a>
fromText :: ByteString -> Text -> Base32String
instance GHC.Classes.Ord Data.Base32String.Base32String
instance GHC.Classes.Eq Data.Base32String.Base32String
instance GHC.Show.Show Data.Base32String.Base32String

module Data.Base32String.Default

-- | Represents a Base32 string. Guarantees that all characters it contains
--   are valid base32 characters.
data Base32String
b32String :: ByteString -> Base32String
b32String' :: ByteString -> Base32String
fromBinary :: Binary a => a -> Base32String
toBinary :: Binary a => Base32String -> a
fromBytes :: ByteString -> Base32String
toBytes :: Base32String -> ByteString
fromText :: Text -> Base32String
toText :: Base32String -> Text
instance Data.Aeson.Types.FromJSON.FromJSON Data.Base32String.Base32String
instance Data.Aeson.Types.ToJSON.ToJSON Data.Base32String.Base32String
