default_algorithm = HMAC_SHA256
-BADSIG = 16
-BADKEY = 17
-BADTIME = 18
-BADTRUNC = 22
-
- def sign(wire, key, rdata, time=None, request_mac=None, ctx=None, multi=False):
- """Return a (tsig_rdata, mac, ctx) tuple containing the HMAC TSIG rdata
- for the input parameters, the HMAC MAC calculated by applying the
- TSIG signature algorithm, and the TSIG digest context.
- @rtype: (string, hmac.HMAC object)
+ def _digest(wire, key, rdata, time=None, request_mac=None, ctx=None,
+ multi=None):
+ """Return a context containing the TSIG rdata for the input parameters
+ @rtype: hmac.HMAC object
@raises ValueError: I{other_data} is too long
@raises NotImplementedError: I{algorithm} is not supported
"""