MCPcopy Create free account
hub / github.com/rthalley/dnspython / get_context

Function get_context

dns/tsig.py:316–326  ·  view source on GitHub ↗

Returns an HMAC context for the specified key. @rtype: HMAC context @raises NotImplementedError: I{algorithm} is not supported

(key)

Source from the content-addressed store, hash-verified

314
315
316def get_context(key):
317 """Returns an HMAC context for the specified key.
318
319 @rtype: HMAC context
320 @raises NotImplementedError: I{algorithm} is not supported
321 """
322
323 if key.algorithm == GSS_TSIG:
324 return GSSTSig(key.secret)
325 else:
326 return HMACTSig(key.secret, key.algorithm)
327
328
329class Key:

Callers 2

_digestFunction · 0.85
_maybe_start_digestFunction · 0.85

Calls 2

GSSTSigClass · 0.85
HMACTSigClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…