Пример #1
0
    def test_kdf(self):

        secret = hex_decode('6FD4C3C0F38E5C7A6F83E99CD9BD')
        salt = hex_decode('DBB986')
        label = hex_decode('')
        expected = hex_decode('02AEB40A3D4B66FBA540F9D4B20006F2046E0F3A029DEAB201FC692B79EB27CEF7E16069046A')

        produced = botan2.kdf('KDF2(SHA-1)', secret, 38, salt, label)

        self.assertEqual(hex_encode(produced), hex_encode(expected))
Пример #2
0
    def test_kdf(self):

        secret = hex_decode('6FD4C3C0F38E5C7A6F83E99CD9BD')
        salt = hex_decode('DBB986')
        label = hex_decode('')
        expected = hex_decode('02AEB40A3D4B66FBA540F9D4B20006F2046E0F3A029DEAB201FC692B79EB27CEF7E16069046A')

        produced = botan2.kdf('KDF2(SHA-1)', secret, 38, salt, label)

        self.assertEqual(hex_encode(produced), hex_encode(expected))
Пример #3
0
 def test_kdf():
     print("KDF2(SHA-1)   %s" %
           hex_encode(botan2.kdf('KDF2(SHA-1)',
                                 hex_decode('701F3480DFE95F57941F804B1B2413EF'), 7,
                                 hex_decode('55A4E9DD5F4CA2EF82'), hex_decode(''))))
Пример #4
0
 def test_kdf():
     print("KDF2(SHA-1)   %s" %
           hex_encode(botan2.kdf('KDF2(SHA-1)',
                                 hex_decode('701F3480DFE95F57941F804B1B2413EF'), 7,
                                 hex_decode('55A4E9DD5F4CA2EF82'), hex_decode(''))))