serokell-util-0.10.0: General-purpose functions by Serokell

Safe HaskellNone
LanguageHaskell2010

Serokell.Util.Base64

Description

Base64 encoding/decoding.

Synopsis

Documentation

encode :: ByteString -> Text Source #

Apply base64 encoding to strict ByteString.

decode :: Text -> Either Text ByteString Source #

Decode base64-encoded ByteString.

encodeUrl :: ByteString -> Text Source #

Apply base64url encoding to strict ByteString.

decodeUrl :: Text -> Either Text ByteString Source #

Decode base64url-encoded ByteString.

formatBase64 :: ByteString -> Builder Source #

Construct Builder from bytestring formatting it in Base64.

base64F :: Format r (ByteString -> r) Source #

Format which uses Base64 to print bytestring.

newtype JsonByteString Source #

Wrapper on top of ByteString with JSON serialization (in base64 encoding).

Instances
Eq JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

Ord JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

Show JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

Arbitrary JsonByteString # 
Instance details

Defined in Serokell.Arbitrary

Hashable JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

ToJSON JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

ToJSONKey JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

FromJSON JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64

FromJSONKey JsonByteString Source # 
Instance details

Defined in Serokell.Util.Base64