Returns an HMAC context for the specified key. @rtype: HMAC context @raises NotImplementedError: I{algorithm} is not supported
(key)
| 314 | |
| 315 | |
| 316 | def 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 | |
| 329 | class Key: |
no test coverage detected
searching dependent graphs…