ConDict

Check-in [c908862bd6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:add md5+sha1 hash
Timelines: family | ancestors | descendants | both | testing
Files: files | file ages | folders
SHA1:c908862bd6c9797b0d46522271eedf4c4b83bb3a
User & Date: alzay 2012-09-04 07:08:11
Context
2012-09-04
11:36
passres for command line v.1 check-in: 8665e61d7f user: alzay tags: testing
07:08
add md5+sha1 hash check-in: c908862bd6 user: alzay tags: testing
06:18
start list-function check-in: 91a15ec25f user: alzay tags: testing
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to condt.py.

59
60
61
62
63
64
65

66
67
68
69
70
71
72
        self.COMMANDS['.exit']['command'] = self.command_exit
        self.COMMANDS['.chname']['command'] = self.command_chname
        self.COMMANDS['.chpassword']['command'] = self.command_chpassword
        self.COMMANDS['.list']['command'] = self.command_list

    def hash_pass(self, password):
        result = bytes(password.strip() + SALT, 'utf-8')

        return hashlib.sha1(result).hexdigest()

    def check_name(self, cur):
        try:
            cur.execute("SELECT id FROM user WHERE name=(?)", (self.name,))
        except sqlite3.DatabaseError as er:
            return None







>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
        self.COMMANDS['.exit']['command'] = self.command_exit
        self.COMMANDS['.chname']['command'] = self.command_chname
        self.COMMANDS['.chpassword']['command'] = self.command_chpassword
        self.COMMANDS['.list']['command'] = self.command_list

    def hash_pass(self, password):
        result = bytes(password.strip() + SALT, 'utf-8')
        result = bytes(hashlib.md5(result).hexdigest(), 'utf-8')
        return hashlib.sha1(result).hexdigest()

    def check_name(self, cur):
        try:
            cur.execute("SELECT id FROM user WHERE name=(?)", (self.name,))
        except sqlite3.DatabaseError as er:
            return None

Changes to db.sqlite.

cannot compute difference between binary files