summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Wellington <bwelling@xbill.org>2020-10-29 16:27:56 -0700
committerBrian Wellington <bwelling@xbill.org>2020-10-29 16:27:56 -0700
commitee12ebcddcdc0732c5c141ebae481a1877b5a1b3 (patch)
tree2db7736f3370cfb4332b5d24bb8c5689bfd065c4
parent726b34133e2567c144d10f1aa9e6f73508cfd8bc (diff)
downloaddnspython-ee12ebcddcdc0732c5c141ebae481a1877b5a1b3.tar.gz
Add repr() for dns.tsig.Key.
-rw-r--r--dns/tsig.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/dns/tsig.py b/dns/tsig.py
index 117b5e5..5c773ff 100644
--- a/dns/tsig.py
+++ b/dns/tsig.py
@@ -336,3 +336,8 @@ class Key:
self.name == other.name and
self.secret == other.secret and
self.algorithm == other.algorithm)
+
+ def __repr__(self):
+ return f"<DNS key name='{self.name}', " + \
+ f"algorithm='{self.algorithm}', " + \
+ f"secret='{base64.b64encode(self.secret).decode()}'>"