Package Crypto :: Package Util :: Module RFC1751
[hide private]
[frames] | no frames]

Module RFC1751

Functions [hide private]
 
_key2bin(s)
Convert a key into a string of binary digits
 
_extract(key, start, length)
Extract a bitstring(2.x)/bytestring(2.x) from a string of binary digits, and return its numeric value.
 
key_to_english(key)
key_to_english(key:string(2.x)/bytes(3.x)) : string Transform an arbitrary key into a string containing English words. The key length must be a multiple of 8.
 
english_to_key(s)
english_to_key(string):string(2.x)/bytes(2.x) 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.
Variables [hide private]
  __revision__ = '$Id$'
  binary = {0: '0000', 1: '0001', 2: '0010', 3: '0011', 4: '0100...
  wordlist = ['A', 'ABE', 'ACE', 'ACT', 'AD', 'ADA', 'ADD', 'AGO...
  __package__ = 'Crypto.Util'
Variables Details [hide private]

binary

Value:
{0: '0000',
 1: '0001',
 2: '0010',
 3: '0011',
 4: '0100',
 5: '0101',
 6: '0110',
 7: '0111',
...

wordlist

Value:
['A',
 'ABE',
 'ACE',
 'ACT',
 'AD',
 'ADA',
 'ADD',
 'AGO',
...