MCPcopy
hub / github.com/learnhouse/learnhouse / hash

Method hash

apps/api/src/security/security.py:39–44  ·  view source on GitHub ↗

Not implemented - we don't create new pbkdf2 hashes. All new hashes should use Argon2.

(self, password: str | bytes, salt: bytes | None = None)

Source from the content-addressed store, hash-verified

37 return hash.startswith('$pbkdf2-sha256$')
38
39 def hash(self, password: str | bytes, salt: bytes | None = None) -> str:
40 """
41 Not implemented - we don't create new pbkdf2 hashes.
42 All new hashes should use Argon2.
43 """
44 raise NotImplementedError("Pbkdf2Sha256Hasher is for verification only. Use Argon2 for new hashes.")
45
46 def verify(self, password: str | bytes, hash: str | bytes) -> bool:
47 """Verify a password against a passlib pbkdf2-sha256 hash."""

Callers 3

security_hash_passwordFunction · 0.80
security_hash_tokenFunction · 0.80

Calls

no outgoing calls