|
Revision 30752, 0.6 KB
(checked in by exarkun, 15 months ago)
|
|
Rewrite the copyright headers to exclude date information.
Author: exarkun
Reviewer: glyph
Fixes: #4857
To avoid the need to perpetually update copyright dates in each file in Twisted,
remove the dates from most files and just leave them in the LICENSE file.
As a side effect, some files also have had a trailing newline added where it was
missing before.
|
| Line | |
|---|
| 1 | # Copyright (c) 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: Paul Swartz |
|---|
| 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 |
|---|