Esempio n. 1
0
    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)
Esempio n. 2
0
 def salt(self):
     return get_random_string(2)
Esempio n. 3
0
 def salt(self):
     """
     Generates a cryptographically secure nonce salt in ascii
     """
     return get_random_string()
Esempio n. 4
0
    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)
Esempio n. 5
0
 def salt(self):
     return get_random_string(2)
Esempio n. 6
0
 def salt(self):
     """
     Generates a cryptographically secure nonce salt in ascii
     """
     return get_random_string()