Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(2)  |  Derive(0)  |  Import(5)
<comment-ja>
SHA1?????????????+salt???????
@param target: SHA1??????????
@type target: str
@param plain: ???????
@type plain: str
@param salt: salt
@type salt: str
@rtype: bool
@return: ?????True, ??????False???????(more...)

        def sha1compare(target, plain, salt=''):
    """
    SHA1?????????????+salt???????
    @param target: SHA1??????????
    @type target: str
    @param plain: ???????
    @type plain: str
    @param salt: salt
    @type salt: str
    @rtype: bool
    @return: ?????True, ??????False???????
    
    
    TODO: English Comment
    
    """
    x = sha(plain+salt).hexdigest()
    if target == x:
        return True
    else:
        return False
        


src/k/a/karesansui-HEAD/karesansui/gadget/userby1.py   karesansui(Download)
    update, delete, save, new
 
from karesansui.lib.crypt import sha1encrypt, sha1compare
from karesansui.lib.checker import Checker, \
    CHECK_EMPTY, CHECK_VALID, CHECK_LENGTH, \
    checker.errors = []
 
    if not sha1compare(user.password, obj.input.password, user.salt):
        check = False
        checker.add_error(_('%s is mismatched.') % _('Current Password'))

src/k/a/karesansui-HEAD/karesansui/db/access/user.py   karesansui(Download)
from sqlalchemy.orm.exc import NoResultFound
 
from karesansui.lib.crypt import sha1compare
from karesansui.db.model.user import User
from karesansui.db.access import dbsave, dbupdate, dbdelete
            return None
 
        if sha1compare(_r.password, password, _r.salt) is True:
            return _r
        else:

src/k/a/karesansui-HEAD/karesansui/gadget/user.py   karesansui(Download)
    update, delete, save, new
 
from karesansui.lib.crypt import sha1encrypt, sha1compare
from karesansui.lib.checker import Checker, \
    CHECK_EMPTY, CHECK_VALID, CHECK_LENGTH, \

src/k/a/karesansui-HEAD/karesansui/gadget/me.py   karesansui(Download)
    CHECK_CHAR, CHECK_MIN, CHECK_MAX, CHECK_ONLYSPACE
from karesansui.db.access.user import findby1, update as dba_update, findby1email
from karesansui.lib.crypt import sha1encrypt, sha1compare
from karesansui.lib.const import \
    DEFAULT_LANGS, LOGOUT_FILE_PREFIX, \

src/k/a/karesansui-HEAD/karesansui/gadget/init.py   karesansui(Download)
 
from karesansui.lib.file.k2v import K2V
from karesansui.lib.crypt import sha1encrypt, sha1compare
from karesansui.lib.const import MACHINE_ATTRIBUTE, MACHINE_HYPERVISOR
from karesansui.db import get_engine, get_metadata, get_session