(self, session)
| 389 | # Why not part of init? |
| 390 | # Also maybe rename to "hash" ? is code confusing? |
| 391 | def new_code(self, session): |
| 392 | salt = hashing_functions.make_salt() |
| 393 | seed = "2uji9890" |
| 394 | self.code = hashing_functions.hashlib.sha256( |
| 395 | (self.email_sent_to + seed + salt).encode('utf-8')).hexdigest() |
| 396 | return self.code |
| 397 | |
| 398 | @staticmethod |
| 399 | def get_latest_code(session, email): |