gdata.Crypto.Util.RFC1751 | index /home/afshar/wrk/gdata-python-client/src/gdata/Crypto/Util/RFC1751.py

`# rfc1751.py : Converts between 128-bit strings and a human-readable
# sequence of words, as defined in RFC1751: "A Convention for
# Human-Readable 128-bit Keys", by Daniel L. McDonald.`

Modules
`` |  |
binascii | string |  |

Functions
`` |  | english_to_key(str) `english_to_key(string):string Transform a string into a corresponding key. The string must contain words separated by whitespace; the number of words must be a multiple of 6.` key_to_english(key) `key_to_english(key:string) : string Transform an arbitrary key into a string containing English words. The key length must be a multiple of 8.`

Data
`` |  | __revision__ = '$Id: RFC1751.py,v 1.6 2003/04/04 15:15:10 akuchling Exp $' binary = {0: '0000', 1: '0001', 2: '0010', 3: '0011', 4: '0100', 5: '0101', 6: '0110', 7: '0111', 8: '1000', 9: '1001', ...} wordlist = ['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'AGO', 'AID', 'AIM', 'AIR', 'ALL', 'ALP', 'AM', 'AMY', 'AN', 'ANA', 'AND', 'ANN', 'ANT', ...]