| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Data.TypedEncoding.Instances.Restriction.Base64
Contents
Description
'r-B64' is restricted to values that are valid Base64 encodings of some data.
 For example, Enc '["r-B64"] () T.Text can contain encoded binary image.
"enc-B64" can be converted to "r-B64" using flattenAs defined in
 Base64.     
 However, there is no, and there should be no conversion general conversion from "r-B64" back to "enc-B64":
 Enc '["r-B64"] () T.Text is not B64 encoded text, it is B64 encoded something.
Since: 0.5.1.0
Synopsis
- encRB64B :: Encoding (Either EncodeEx) "r-B64" "r-B64" c ByteString
 - encRB64BL :: Encoding (Either EncodeEx) "r-B64" "r-B64" c ByteString
 - encRB64T :: Encoding (Either EncodeEx) "r-B64" "r-B64" c Text
 - encRB64TL :: Encoding (Either EncodeEx) "r-B64" "r-B64" c Text
 - encRB64S :: Encoding (Either EncodeEx) "r-B64" "r-B64" c String
 
Documentation
>>>:set -XScopedTypeVariables -XKindSignatures -XMultiParamTypeClasses -XDataKinds -XPolyKinds -XPartialTypeSignatures -XFlexibleInstances -XTypeApplications
encRB64T :: Encoding (Either EncodeEx) "r-B64" "r-B64" c Text Source #
Converts text to bytestring using UTF8 decoding and then verify encoding in ByteString This is safe without verifying ASCII, any non-ASCII text will still convert to ByteString but will fail B64.decode (TODO tests would be nice)