| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Data.Base32String
Synopsis
- data Base32String
- b32String :: ByteString -> ByteString -> Base32String
- b32String' :: ByteString -> ByteString -> Base32String
- fromBinary :: Binary a => ByteString -> a -> Base32String
- toBinary :: Binary a => ByteString -> Base32String -> a
- fromBytes :: ByteString -> ByteString -> Base32String
- toBytes :: ByteString -> Base32String -> ByteString
- toText :: Base32String -> Text
- fromText :: ByteString -> Text -> Base32String
Documentation
data Base32String #
Represents a Base32 string. Guarantees that all characters it contains are valid base32 characters.
Instances
| Eq Base32String # | |
Defined in Data.Base32String | |
| Ord Base32String # | |
Defined in Data.Base32String Methods compare :: Base32String -> Base32String -> Ordering # (<) :: Base32String -> Base32String -> Bool # (<=) :: Base32String -> Base32String -> Bool # (>) :: Base32String -> Base32String -> Bool # (>=) :: Base32String -> Base32String -> Bool # max :: Base32String -> Base32String -> Base32String # min :: Base32String -> Base32String -> Base32String # | |
| Show Base32String # | |
Defined in Data.Base32String Methods showsPrec :: Int -> Base32String -> ShowS # show :: Base32String -> String # showList :: [Base32String] -> ShowS # | |
| ToJSON Base32String # | |
Defined in Data.Base32String.Default Methods toJSON :: Base32String -> Value # toEncoding :: Base32String -> Encoding # toJSONList :: [Base32String] -> Value # toEncodingList :: [Base32String] -> Encoding # | |
| FromJSON Base32String # | |
Defined in Data.Base32String.Default | |
Arguments
| :: ByteString | Our Base32 mapping table |
| -> ByteString | Our Base32 string |
| -> Base32String |
Smart constructor which validates that all the text are actually base-32 characters.
Arguments
| :: ByteString | Our Base32 mapping table |
| -> ByteString | Our Base32 string |
| -> Base32String |
Case insensitive variant of b32String, which converts all characters
to upper case.
Arguments
| :: Binary a | |
| => ByteString | Our Base32 mapping table |
| -> a | Input object that is convertable to binary |
| -> Base32String | Base32 representation of binary data |
Converts a Binary to a Base32String value
Arguments
| :: Binary a | |
| => ByteString | Base32 mapping table |
| -> Base32String | Base32 representation |
| -> a | Converted object |
Converts a Base32String to a Binary value
Arguments
| :: ByteString | Our Base32 mapping table |
| -> ByteString | Raw binary bytes |
| -> Base32String | Base32 representation of raw binary bytes |
Reads a ByteString as raw bytes and converts to base32 representation. We
cannot use the instance Binary of ByteString because it provides
a leading length, which is not what we want when dealing with raw bytes.
Arguments
| :: ByteString | Base32 mapping table |
| -> Base32String | Base32 string we wish to get binary data from |
| -> ByteString | Raw binary representation |
Access to the raw bytes in a ByteString format.
toText :: Base32String -> Text #
Access to a Text representation of the Base32String
Arguments
| :: ByteString | Base32 mapping table |
| -> Text | Text representation |
| -> Base32String | Base32 classified representation |
Converts a Text representation to a Base32String