parameters: (password,username=None,uid=None)
return_statement: return public.md5(public.md5(password+'_bt.cn')+salt)
docstring: @name 为指定密码加盐
          @author hwliang<2020-07-08>
          @param password string(被md5加密一次的密码)
          @param username string(用户名) 可选
          @param uid int(uid) 可选
          @return string
function: def password_salt(password,username=None,uid=None):
      '''
          @name 为指定密码加盐
          @author hwliang<2020-07-08>
          @param password string(被md5加密一次的密码)
          @param username string(用户名) 可选
          @param uid int(uid) 可选
          @return string
      '''
      global salt
      if not salt:
          salt = public.M('users').where('id=?',(uid,)).getField('salt')
          if salt:
              salt = salt[0]
          else:
              salt = ""
      return public.md5(public.md5(password+'_bt.cn')+salt)
function_tokens: def password_salt ( password , username = None , uid = None ) : global salt if not salt : salt = public . M ( 'users' ) . where ( 'id=?' , ( uid , ) ) . getField ( 'salt' ) if salt : salt = salt [ 0 ] else : salt = "" return public . md5 ( public . md5 ( password + '_bt.cn' ) + salt )