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