Beispiel #1
0
 def test_value(self):
     ks = pol.ks.KeyStretching.setup({
             'type': 'scrypt', 'Nexp': 15, 'salt': 'waasdasdaa'})
     self.assertEqual(binascii.hexlify(
             ks.stretch('waasdasdada')),
                         '69e9b3dafbc7cbe8d903fb1e6e1633da6c45fcd3f6e'+
                         'df66d34532a2883a7abd9390bbc834020a0539d8304'+
                         '570ee7b9eb64ab00ecad1bbd89e1a93c2c38646581')
Beispiel #2
0
 def test_value_v10(self):
     ks = pol.ks.KeyStretching.setup({
         'type': 'argon2', 't': 1, 'm':8, 'p':1, 'salt': 'waasdasdaa'})
     self.assertEqual(binascii.hexlify(
             ks.stretch('waasdasdada')),
                         '16a0a8427be8fe5a1ecce6b03ef9607a1d4064168e1'+
                         '94af4c13652af8a1728f8c4acc59d0cabe7159104de'+
                         '737165f6c646d912307bbfa9db11adab00bdaabf4b')
Beispiel #3
0
 def test_value(self):
     ks = pol.ks.KeyStretching.setup({"type": "argon2", "t": 1, "m": 8, "p": 1, "salt": "waasdasdaa"})
     self.assertEqual(
         binascii.hexlify(ks.stretch("waasdasdada")),
         "16a0a8427be8fe5a1ecce6b03ef9607a1d4064168e1"
         + "94af4c13652af8a1728f8c4acc59d0cabe7159104de"
         + "737165f6c646d912307bbfa9db11adab00bdaabf4b",
     )
Beispiel #4
0
 def test_value(self):
     ks = pol.ks.KeyStretching.setup({"type": "scrypt", "Nexp": 15, "salt": "waasdasdaa"})
     self.assertEqual(
         binascii.hexlify(ks.stretch("waasdasdada")),
         "69e9b3dafbc7cbe8d903fb1e6e1633da6c45fcd3f6e"
         + "df66d34532a2883a7abd9390bbc834020a0539d8304"
         + "570ee7b9eb64ab00ecad1bbd89e1a93c2c38646581",
     )
Beispiel #5
0
 def test_value_v13(self):
     ks = pol.ks.KeyStretching.setup({
         'type': 'argon2', 't': 1, 'm':8, 'p':1, 'salt': 'waasdasdaa',
         'v':0x13})
     self.assertEqual(binascii.hexlify(
             ks.stretch('waasdasdada')),
                ('96f5ba079ff69cb9a0eecc16399a2d12fab4d7b7fd1591c1b5b14d59c9'
                 '498a7f9598c6912d970ca7db619177cc22be83996bdf5a480a346c33c8'
                 '857e7578fc61'))
Beispiel #6
0
 def test_value(self):
     ks = pol.ks.KeyStretching.setup({
         'type': 'scrypt',
         'Nexp': 15,
         'salt': 'waasdasdaa'
     })
     self.assertEqual(
         binascii.hexlify(ks.stretch('waasdasdada')),
         '69e9b3dafbc7cbe8d903fb1e6e1633da6c45fcd3f6e' +
         'df66d34532a2883a7abd9390bbc834020a0539d8304' +
         '570ee7b9eb64ab00ecad1bbd89e1a93c2c38646581')
Beispiel #7
0
 def test_value_v10(self):
     ks = pol.ks.KeyStretching.setup({
         'type': 'argon2',
         't': 1,
         'm': 8,
         'p': 1,
         'salt': 'waasdasdaa'
     })
     self.assertEqual(
         binascii.hexlify(ks.stretch('waasdasdada')),
         '16a0a8427be8fe5a1ecce6b03ef9607a1d4064168e1' +
         '94af4c13652af8a1728f8c4acc59d0cabe7159104de' +
         '737165f6c646d912307bbfa9db11adab00bdaabf4b')
Beispiel #8
0
 def test_value_v13(self):
     ks = pol.ks.KeyStretching.setup({
         'type': 'argon2',
         't': 1,
         'm': 8,
         'p': 1,
         'salt': 'waasdasdaa',
         'v': 0x13
     })
     self.assertEqual(
         binascii.hexlify(ks.stretch('waasdasdada')),
         ('96f5ba079ff69cb9a0eecc16399a2d12fab4d7b7fd1591c1b5b14d59c9'
          '498a7f9598c6912d970ca7db619177cc22be83996bdf5a480a346c33c8'
          '857e7578fc61'))