Safe Haskell | None |
---|---|
Language | Haskell2010 |
Core functionality for conversion between binary formats and PGP word lists.
- toText :: ByteString -> Text
- fromText :: Text -> Either TranslationError ByteString
- toEvenWord :: Word8 -> EvenWord
- toOddWord :: Word8 -> OddWord
- fromEvenWord :: Text -> Either TranslationError Word8
- fromOddWord :: Text -> Either TranslationError Word8
- evenMap :: Word8Bimap EvenWord
- oddMap :: Word8Bimap OddWord
Documentation
toText :: ByteString -> Text Source
Inverse of fromText
, modulo whitespace count.
fromText :: Text -> Either TranslationError ByteString Source
Convert a text of whitespace-separated words to their binary
representation. The whitespace splitting behaviour is given by words
.
toEvenWord :: Word8 -> EvenWord Source
Look up the word corresponding to a byte.
fromEvenWord :: Text -> Either TranslationError Word8 Source
Simple conversion, taking into account invalid words.
fromOddWord :: Text -> Either TranslationError Word8 Source
Simple conversion, taking into account invalid words.
evenMap :: Word8Bimap EvenWord Source
Mapping from and to EvenWord
s
oddMap :: Word8Bimap OddWord Source
Mapping from and to OddWord
s