equal
deleted
inserted
replaced
329 `encodings` is a tuple with all usable encoding suffixes. The tuple may |
329 `encodings` is a tuple with all usable encoding suffixes. The tuple may |
330 be empty. |
330 be empty. |
331 """ |
331 """ |
332 dcv = cfg_dget('misc.dovecot_version') |
332 dcv = cfg_dget('misc.dovecot_version') |
333 schemes = (k for (k, v) in _scheme_info.iteritems() if v[1] <= dcv) |
333 schemes = (k for (k, v) in _scheme_info.iteritems() if v[1] <= dcv) |
334 if dcv >= 0x10100a01: |
334 encodings = ('.B64', '.BASE64', '.HEX') if dcv >= 0x10100a01 else () |
335 encodings = ('.B64', '.BASE64', '.HEX') |
|
336 else: |
|
337 encodings = () |
|
338 return schemes, encodings |
335 return schemes, encodings |
339 |
336 |
340 |
337 |
341 def verify_scheme(scheme): |
338 def verify_scheme(scheme): |
342 """Checks if the password scheme *scheme* is known and supported by the |
339 """Checks if the password scheme *scheme* is known and supported by the |