Commits

Christian Heimes  committed 690d5be

test hmac digest length

  • Participants
  • Parent commits 7999d8c

Comments (0)

Files changed (1)

             key = fromhex(key)
             msg = fromhex(msg)
             mac = hmac.new(key, msg, self.new)
+            self.assertEqual(len(mac.digest()), self.digest_size)
             result = mac.hexdigest()
             self.assertEqual(result, expected,
                              "%s != %s for %r, %r" %