branch | 3.26 |
changeset 12616 | bfab695b740a |
parent 12615 | 7abe23cbfda1 |
child 12626 | 32ee89340e59 |
12615:7abe23cbfda1 | 12616:bfab695b740a |
---|---|
24 |
24 |
25 from Crypto.Cipher import Blowfish |
25 from Crypto.Cipher import Blowfish |
26 |
26 |
27 |
27 |
28 _CYPHERERS = {} |
28 _CYPHERERS = {} |
29 |
|
30 |
|
29 def _cypherer(seed): |
31 def _cypherer(seed): |
30 try: |
32 try: |
31 return _CYPHERERS[seed] |
33 return _CYPHERERS[seed] |
32 except KeyError: |
34 except KeyError: |
33 _CYPHERERS[seed] = Blowfish.new(seed, Blowfish.MODE_ECB) |
35 _CYPHERERS[seed] = Blowfish.new(seed, Blowfish.MODE_ECB) |