Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Defines Base64 encoding
Synopsis
- acceptLenientS :: Enc ("enc-B64-len" ': ys) c ByteString -> Enc ("enc-B64" ': ys) c ByteString
- acceptLenientL :: Enc ("enc-B64-len" ': ys) c ByteString -> Enc ("enc-B64" ': ys) c ByteString
- encB64B :: Applicative f => Encoding f "enc-B64" "enc-B64" c ByteString
- encB64BL :: Applicative f => Encoding f "enc-B64" "enc-B64" c ByteString
- endB64T :: Applicative f => Encoding f "enc-B64" "enc-B64" c Text
- decB64B :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c ByteString
- decB64BL :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c ByteString
- decB64T :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c Text
- decB64TL :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c Text
Documentation
>>>
:set -XOverloadedStrings -XScopedTypeVariables -XKindSignatures -XMultiParamTypeClasses -XDataKinds -XPolyKinds -XPartialTypeSignatures -XFlexibleInstances -XTypeApplications
>>>
import Test.QuickCheck
>>>
import Test.QuickCheck.Instances.Text()
>>>
import Test.QuickCheck.Instances.ByteString()
Conversions
acceptLenientS :: Enc ("enc-B64-len" ': ys) c ByteString -> Enc ("enc-B64" ': ys) c ByteString Source #
acceptLenientL :: Enc ("enc-B64-len" ': ys) c ByteString -> Enc ("enc-B64" ': ys) c ByteString Source #
Encoders
encB64B :: Applicative f => Encoding f "enc-B64" "enc-B64" c ByteString Source #
encB64BL :: Applicative f => Encoding f "enc-B64" "enc-B64" c ByteString Source #
endB64T :: Applicative f => Encoding f "enc-B64" "enc-B64" c Text Source #
This function will likely be removed in future versions (performance concerns)
Decoders
decB64B :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c ByteString Source #
Effectful decoding for corruption detection. This protocol is used, for example, in emails. It is a well known encoding and hackers will have no problem making undetectable changes, but error handling at this stage could verify that email was corrupted.
decB64BL :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c ByteString Source #
decB64T :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c Text Source #
Warning: This method was not optimized for performance.
decB64TL :: (UnexpectedDecodeErr f, Applicative f) => Decoding f "enc-B64" "enc-B64" c Text Source #
Warning: This method was not optimized for performance.
Validation
Orphan instances
EncodingSuperset "enc-B64" Source # | This is not precise, actually Base 64 uses a subset of ASCII
and that would require a new definition This instance likely to be changed / corrected in the future if
Since: 0.3.0.0 |
type EncSuperset "enc-B64" :: Symbol Source # implEncInto :: Enc ("enc-B64" ': xs) c str -> Enc (EncSuperset "enc-B64" ': ("enc-B64" ': xs)) c str Source # | |
FlattenAs "r-ASCII" "enc-B64" Source # | |
FlattenAs "r-ASCII" "enc-B64-nontext" Source # | allow to treat B64 encodings as ASCII forgetting about B64 encoding
|
Applicative f => Encode f "enc-B64" "enc-B64" c Text Source # | This instance will likely be removed in future versions (performance concerns) |
Applicative f => Encode f "enc-B64" "enc-B64" c ByteString Source # | |
encoding :: Encoding f "enc-B64" "enc-B64" c ByteString Source # | |
Applicative f => Encode f "enc-B64" "enc-B64" c ByteString Source # | |
encoding :: Encoding f "enc-B64" "enc-B64" c ByteString Source # | |
Applicative f => Validate f "enc-B64-len" "enc-B64-len" c ByteString Source # | Lenient decoding does not fail |
validation :: Validation f "enc-B64-len" "enc-B64-len" c ByteString Source # | |
Applicative f => Validate f "enc-B64-len" "enc-B64-len" c ByteString Source # | Lenient decoding does not fail |
validation :: Validation f "enc-B64-len" "enc-B64-len" c ByteString Source # | |
(RecreateErr f, Applicative f) => Validate f "enc-B64" "enc-B64" c Text Source # | |
validation :: Validation f "enc-B64" "enc-B64" c Text Source # | |
(RecreateErr f, Applicative f) => Validate f "enc-B64" "enc-B64" c Text Source # | |
validation :: Validation f "enc-B64" "enc-B64" c Text Source # | |
(RecreateErr f, Applicative f) => Validate f "enc-B64" "enc-B64" c ByteString Source # | |
validation :: Validation f "enc-B64" "enc-B64" c ByteString Source # | |
(RecreateErr f, Applicative f) => Validate f "enc-B64" "enc-B64" c ByteString Source # | |
validation :: Validation f "enc-B64" "enc-B64" c ByteString Source # | |
(UnexpectedDecodeErr f, Applicative f) => Decode f "enc-B64" "enc-B64" c Text Source # | WARNING (performance) |
(UnexpectedDecodeErr f, Applicative f) => Decode f "enc-B64" "enc-B64" c Text Source # | WARNING (performance) |
(UnexpectedDecodeErr f, Applicative f) => Decode f "enc-B64" "enc-B64" c ByteString Source # | |
decoding :: Decoding f "enc-B64" "enc-B64" c ByteString Source # | |
(UnexpectedDecodeErr f, Applicative f) => Decode f "enc-B64" "enc-B64" c ByteString Source # | |
decoding :: Decoding f "enc-B64" "enc-B64" c ByteString Source # |