MCPcopy Index your code
hub / github.com/diffgram/diffgram / new_code

Method new_code

shared/database/user.py:391–396  ·  view source on GitHub ↗
(self, session)

Source from the content-addressed store, hash-verified

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):

Callers 2

newFunction · 0.95
newMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected