def test_get_random_string(self): from webtools.utils.crypto import get_random_string res = get_random_string() self.assertEqual(len(res), 12) self.assertIsInstance(res, str)
def salt(self): return get_random_string(2)
def salt(self): """ Generates a cryptographically secure nonce salt in ascii """ return get_random_string()