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