MCPcopy
hub / github.com/ticarpi/jwt_tool / genContents

Function genContents

jwt_tool.py:1192–1197  ·  view source on GitHub ↗
(headDict, paylDict, newContents="")

Source from the content-addressed store, hash-verified

1190 return newVal
1191
1192def genContents(headDict, paylDict, newContents=""):
1193 if paylDict == {}:
1194 newContents = base64.urlsafe_b64encode(json.dumps(headDict,separators=(",",":")).encode()).decode('UTF-8').strip("=")+"."
1195 else:
1196 newContents = base64.urlsafe_b64encode(json.dumps(headDict,separators=(",",":")).encode()).decode('UTF-8').strip("=")+"."+base64.urlsafe_b64encode(json.dumps(paylDict,separators=(",",":")).encode()).decode('UTF-8').strip("=")
1197 return newContents.encode().decode('UTF-8')
1198
1199def dissectPayl(paylDict, count=False):
1200 timeseen = 0

Callers 15

tamperTokenFunction · 0.85
signTokenHSFunction · 0.85
jwksGenFunction · 0.85
jwksEmbedFunction · 0.85
signTokenRSAFunction · 0.85
signTokenECFunction · 0.85
signTokenPSSFunction · 0.85
verifyTokenRSAFunction · 0.85
verifyTokenECFunction · 0.85
verifyTokenPSSFunction · 0.85
rejigTokenFunction · 0.85
injectCommonClaimsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected