Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/twisted_8_1/twisted/conch/openssh_compat/primes.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4 #
5
6 """
7 Parsing for the moduli file, which contains Diffie-Hellman prime groups.
8
9 Maintainer: U{Paul Swartz<mailto:z3p@twistedmatrix.com>}
10 """
11
12 def parseModuliFile(filename):
13 lines = open(filename).readlines()
14 primes = {}
15 for l in lines:
16 l = l.strip()
17 if not l or l[0]=='#':
18 continue
19 tim, typ, tst, tri, size, gen, mod = l.split()
20 size = int(size) + 1
21 gen = long(gen)
22 mod = long(mod, 16)
23 if not primes.has_key(size):
24 primes[size] = []
25 primes[size].append((gen, mod))
26 return primes
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/conch/openssh_compat/factory.py ('k') | third_party/twisted_8_1/twisted/conch/recvline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698