Пример #1
0
 def mergeData(self, key, input_data, id_, standard_data=None, iv=None):
     # standard_data can be set to {} so need to explicitly check
     # that it is equal to None
     if standard_data is None:
         iv = iv or crypto.getRandomIV()
         standard_data = {
             'Id': id_,
             'Nonce': iv,
             'Verifier': getVerifier(iv, key)
         }
     return util.merge(standard_data, input_data)
Пример #2
0
 def mergeData(self, key, input_data, id_, standard_data=None, iv=None):
     # standard_data can be set to {} so need to explicitly check
     # that it is equal to None
     if standard_data is None:
         iv = iv or crypto.getRandomIV()
         standard_data = {
             'Id': id_,
             'Nonce': iv,
             'Verifier': getVerifier(iv, key)
         }
     return util.merge(standard_data, input_data)
Пример #3
0
 def testMerge(self):
     a = {1: 2, 2: 2}
     b = {1: 1, 3: 3}
     self.assertEqual({1: 1, 2: 2, 3: 3}, util.merge(a, b))
Пример #4
0
 def testMerge(self):
     a = {1: 2, 2: 2}
     b = {1: 1, 3: 3}
     self.assertEqual({1: 1, 2: 2, 3: 3}, util.merge(a, b))