MCPcopy Create free account
hub / github.com/ProtonMail/proton-python-client / calculate_k

Method calculate_k

tests/testserver.py:42–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 return h.digest()
41
42 def calculate_k(self):
43 h = self.hash_class()
44 h.update(self.generator.to_bytes(SRP_LEN_BYTES, 'little'))
45 h.update(long_to_bytes(self.modulus, SRP_LEN_BYTES))
46 return bytes_to_long(h.digest())
47
48 def get_challenge(self):
49 return long_to_bytes(self.B, SRP_LEN_BYTES)

Callers 1

setupMethod · 0.95

Calls 4

long_to_bytesFunction · 0.90
bytes_to_longFunction · 0.90
updateMethod · 0.80
digestMethod · 0.80

Tested by

no test coverage detected