Z-Data-0.6.0.0: Array, vector and text
Copyright(c) Dong Han 2017-2018
LicenseBSD
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Z.Data.Vector.Hex

Description

This module provides hex encoding & decoding tools, as well as HexBytes newtype with hex textual instances.

Synopsis

The HexBytes type

newtype HexBytes Source #

New type wrapper for Bytes with hex encoding(uppercase) Show/JSON instances.

Constructors

HexBytes 

Fields

Instances

Instances details
Eq HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Ord HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Show HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Semigroup HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Monoid HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Hashable HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Methods

hashWithSalt :: Int -> HexBytes -> Int #

hash :: HexBytes -> Int #

Print HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

JSON HexBytes Source # 
Instance details

Defined in Z.Data.Vector.Hex

Encoding & Decoding functions

hexEncode Source #

Arguments

:: Bool

uppercase?

-> Bytes 
-> Bytes 

Encode Bytes using hex(base16) encoding.

hexEncodeText Source #

Arguments

:: Bool

uppercase?

-> Bytes 
-> Text 

Text version of hexEncode.

hexEncodeBuilder Source #

Arguments

:: Bool

uppercase?

-> Bytes 
-> Builder () 

Builder version of hexEncode.

hexDecode :: Bytes -> Maybe Bytes Source #

Decode a hex encoding string, return Nothing on illegal bytes or incomplete input.

hexDecode' :: HasCallStack => Bytes -> Bytes Source #

Decode a hex encoding string, throw HexDecodeException on error.

Internal C FFIs