MCPcopy Create free account
hub / github.com/RNCryptor/RNCryptor-python / compare_in_constant_time

Function compare_in_constant_time

rncryptor.py:55–56  ·  view source on GitHub ↗
(left, right)

Source from the content-addressed store, hash-verified

53
54if hasattr(hmac, 'compare_digest'):
55 def compare_in_constant_time(left, right):
56 return hmac.compare_digest(left, right)
57else:
58 def compare_in_constant_time(left, right):
59 length_left = len(left)

Callers 1

decryptMethod · 0.85

Calls 1

bordFunction · 0.85

Tested by

no test coverage detected