pgp-wordlist-0.1: Translate between binary data and a human-readable collection of words.

Safe HaskellSafe
LanguageHaskell2010

Data.Text.PgpWordlist

Description

Translate between binary data and a human-readable collection of words.

Synopsis

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.

data TranslationError Source

Possible translation errors from a list of PGP words to binary format.

Constructors

BadWord Text

Word is not recognized

BadParity Text Word8

Word is recognized, but from the wrong alphabet. Duplicates, omissions, and neighbour transpositions are often cause for this.