From: Stefan Metzmacher Date: Fri, 11 Feb 2022 14:47:22 +0000 (+0100) Subject: python:tests: Allow to print krb5 encryption keys as string X-Git-Tag: talloc-2.3.4~372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc8a29435ef72d32839943dad884b5a562d97d8e;p=thirdparty%2Fsamba.git python:tests: Allow to print krb5 encryption keys as string Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py index 74d111d386b..91c0163d0f8 100644 --- a/python/samba/tests/krb5/raw_testcase.py +++ b/python/samba/tests/krb5/raw_testcase.py @@ -231,6 +231,10 @@ class Krb5EncryptionKey: self.ctype = EncTypeChecksum[self.etype] self.kvno = kvno + def __str__(self): + return "etype=%d ctype=%d kvno=%d key=%s" % ( + self.etype, self.ctype, self.kvno, self.key) + def encrypt(self, usage, plaintext): ciphertext = kcrypto.encrypt(self.key, usage, plaintext) return ciphertext