| OLD | NEW |
| 1 """Class for storing SRP password verifiers.""" | 1 """Class for storing SRP password verifiers.""" |
| 2 | 2 |
| 3 from utils.cryptomath import * | 3 from utils.cryptomath import * |
| 4 from utils.compat import * | 4 from utils.compat import * |
| 5 import mathtls | 5 import mathtls |
| 6 from BaseDB import BaseDB | 6 from basedb import BaseDB |
| 7 | 7 |
| 8 class VerifierDB(BaseDB): | 8 class VerifierDB(BaseDB): |
| 9 """This class represent an in-memory or on-disk database of SRP | 9 """This class represent an in-memory or on-disk database of SRP |
| 10 password verifiers. | 10 password verifiers. |
| 11 | 11 |
| 12 A VerifierDB can be passed to a server handshake to authenticate | 12 A VerifierDB can be passed to a server handshake to authenticate |
| 13 a client based on one of the verifiers. | 13 a client based on one of the verifiers. |
| 14 | 14 |
| 15 This class is thread-safe. | 15 This class is thread-safe. |
| 16 """ | 16 """ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 @type bits: int | 80 @type bits: int |
| 81 @param bits: This values specifies which SRP group parameters | 81 @param bits: This values specifies which SRP group parameters |
| 82 to use. It must be one of (1024, 1536, 2048, 3072, 4096, 6144, | 82 to use. It must be one of (1024, 1536, 2048, 3072, 4096, 6144, |
| 83 8192). Larger values are more secure but slower. 2048 is a | 83 8192). Larger values are more secure but slower. 2048 is a |
| 84 good compromise between safety and speed. | 84 good compromise between safety and speed. |
| 85 | 85 |
| 86 @rtype: tuple | 86 @rtype: tuple |
| 87 @return: A tuple which may be stored in a VerifierDB. | 87 @return: A tuple which may be stored in a VerifierDB. |
| 88 """ | 88 """ |
| 89 return mathtls.makeVerifier(username, password, bits) | 89 return mathtls.makeVerifier(username, password, bits) |
| 90 makeVerifier = staticmethod(makeVerifier) | 90 makeVerifier = staticmethod(makeVerifier) |
| OLD | NEW |