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