| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Bitcoin.Misc.OctetStream
Description
Conversion between different "octet stream" formats for convenience.
TODO: utf8 handling for text
- class OctetStream a where
- word8_to_char :: Word8 -> Char
- char_to_word8 :: Char -> Word8
Documentation
class OctetStream a where Source #
Methods
toByteString :: a -> ByteString Source #
toWord8List :: a -> [Word8] Source #
unsafeToCharList :: a -> [Char] Source #
toIntegerLE :: a -> Integer Source #
toIntegerBE :: a -> Integer Source #
fromByteString :: ByteString -> a Source #
fromWord8List :: [Word8] -> a Source #
fromCharList :: [Char] -> a Source #
fromIntegerLE :: Integer -> a Source #
fromIntegerBE :: Integer -> a Source #
Instances
| OctetStream String Source # | Note: we treat String as an ASCII string here, no fancy utf8 here (it's in the TODO) |
| OctetStream ByteString Source # | |
| OctetStream SHA1 Source # | |
| OctetStream SHA256 Source # | |
| OctetStream RipEmd160 Source # | |
| OctetStream Hash256 Source # | |
| OctetStream Hash160 Source # | |
| OctetStream ScriptHash Source # | |
| OctetStream RawScript Source # | |
| OctetStream SHA512 Source # | |
| OctetStream MD5 Source # | |
| OctetStream SharedSecret Source # | |
| OctetStream PubKeyHash Source # | |
| OctetStream [Word8] Source # | |
word8_to_char :: Word8 -> Char Source #
char_to_word8 :: Char -> Word8 Source #