MCPcopy
hub / github.com/tornadoweb/tornado / get_signature_key_version

Function get_signature_key_version

tornado/web.py:3797–3807  ·  view source on GitHub ↗
(value: Union[str, bytes])

Source from the content-addressed store, hash-verified

3795
3796
3797def get_signature_key_version(value: Union[str, bytes]) -> Optional[int]:
3798 value = utf8(value)
3799 version = _get_version(value)
3800 if version < 2:
3801 return None
3802 try:
3803 key_version, _, _, _, _ = _decode_fields_v2(value)
3804 except ValueError:
3805 return None
3806
3807 return key_version
3808
3809
3810def _create_signature_v1(secret: Union[str, bytes], *parts: Union[str, bytes]) -> bytes:

Callers 2

Calls 3

utf8Function · 0.90
_get_versionFunction · 0.85
_decode_fields_v2Function · 0.85

Tested by 1