379 return '{%s}%s' % (self._scheme, self.__pwMD4(password)) |
379 return '{%s}%s' % (self._scheme, self.__pwMD4(password)) |
380 elif self._scheme in ['SMD5', 'SSHA', 'CRAM-MD5', 'HMAC-MD5', |
380 elif self._scheme in ['SMD5', 'SSHA', 'CRAM-MD5', 'HMAC-MD5', |
381 'LANMAN', 'NTLM', 'RPA']: |
381 'LANMAN', 'NTLM', 'RPA']: |
382 cmd_args = [self._Cfg.dget('bin.dovecotpw'), '-s', self._scheme, |
382 cmd_args = [self._Cfg.dget('bin.dovecotpw'), '-s', self._scheme, |
383 '-p', password] |
383 '-p', password] |
384 if self._Cfg.dget('misc.dovecot_version') >= 0x20000a1: |
384 if self._Cfg.dget('misc.dovecot_version') >= 0x20000a01: |
385 cmd_args.insert(1, 'pw') |
385 cmd_args.insert(1, 'pw') |
386 return Popen(cmd_args, stdout=PIPE).communicate()[0][:-1] |
386 return Popen(cmd_args, stdout=PIPE).communicate()[0][:-1] |
387 else: |
387 else: |
388 return '{%s}%s' % (self._scheme, password) |
388 return '{%s}%s' % (self._scheme, password) |
389 |
389 |