def test_radcrypt_large(self): 'Test a password longer than 16 octets.' LARGE_PASS = b'`0T8/Ub\tojdP;\rc:L}#_hOF' LARGE_CRYPT = b'\xf5\xf4X\xd6\x84\xdf\x0cV,\x8b\xf2\xadfa\xb4,S\xef\x0f\x908\xfcH\x9a\xe9r\xcc\xd0\x07\x84\xdc\x98' c = radius.radcrypt(TEST_SECRET, self.authenticator, LARGE_PASS) self.assertEqual(c, LARGE_CRYPT)
def test_radcrypt_small(self): 'Test a password shorter than 16 octets.' SMALL_PASS = b'I3Zl@"42Xs%^[nk' SMALL_CRYPT = b'\xdc\xf7V\x82\xeb\xa8Zm\x1b\x92\xb3\xa3\x06\x02\xbc\x16' c = radius.radcrypt(TEST_SECRET, self.authenticator, SMALL_PASS) self.assertEqual(c, SMALL_CRYPT)