2
이 코드를 가지고,하지만 난이 오류가 얻을 왜 내가 이해할 수 없다 :형식 오류 : '_sre.SRE_Match'와 '_sre.SRE_Match'
a= name+pw+salt
TypeError: unsupported operand type(s) for +: '_sre.SRE_Match' and '_sre.SRE_Match'
스크립트를 +위한 지원되지 않는 피연산자 유형 (들)
class MainHandler(Handler):
def make_salt(self):
return ''.join(random.choice(string.ascii_letters) for x in range(5))
def make_pw_hash(self, name, pw):
salt = self.make_salt()
a= name+pw+salt //problem here
h = hashlib.sha256(a.encode("UTF8")).hexdigest()
return '%s|%s' % (h, salt)
def post(self):
store_hash_and_salt = self.make_pw_hash("José", "somePass")
print (store_hash_and_salt)
그는 맞습니다. 어딘가에 초기화 된 객체를 가져 와서 make_pw_hash – User