MCPcopy
hub / github.com/postmanlabs/httpbin / HA1

Function HA1

httpbin/helpers.py:279–288  ·  view source on GitHub ↗

Create HA1 hash by realm, username, password HA1 = md5(A1) = MD5(username:realm:password)

(realm, username, password, algorithm)

Source from the content-addressed store, hash-verified

277
278
279def HA1(realm, username, password, algorithm):
280 """Create HA1 hash by realm, username, password
281
282 HA1 = md5(A1) = MD5(username:realm:password)
283 """
284 if not realm:
285 realm = u''
286 return H(b":".join([username.encode('utf-8'),
287 realm.encode('utf-8'),
288 password.encode('utf-8')]), algorithm)
289
290
291def HA2(credentails, request, algorithm):

Callers 1

responseFunction · 0.85

Calls 1

HFunction · 0.85

Tested by

no test coverage detected