Esempio n. 1
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(Group, self).hash()
     return khash(hashed, frozenset(self._values))
Esempio n. 2
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Repeat, self).hash()
     return khash(hashed, self._min_times, self._max_times, self._step, self._repeats)
Esempio n. 3
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(String, self).hash()
     return khash(hashed, self._max_size)
Esempio n. 4
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Conditional, self).hash()
     return khash(hashed, self._condition.hash())
Esempio n. 5
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(RandomBits, self).hash()
     return khash(hashed, self._min_length, self._max_length, self._num_mutations, self._step, self._seed)
Esempio n. 6
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(Group, self).hash()
     return khash(hashed, frozenset(self._values))
Esempio n. 7
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Pad, self).hash()
     return khash(hashed, self._pad_length, self._pad_data)
Esempio n. 8
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Trunc, self).hash()
     return khash(hashed, self._max_size)
Esempio n. 9
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(ForEach, self).hash()
     return khash(hashed + self._mutated_field.hash())
Esempio n. 10
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Conditional, self).hash()
     return khash(hashed, self._condition.hash())
Esempio n. 11
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Trunc, self).hash()
     return khash(hashed, self._max_size)
Esempio n. 12
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the condition
     '''
     hashed = super(Compare, self).hash()
     return khash(hashed, self._comp_value, self._comp_type)
Esempio n. 13
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(Calculated, self).hash()
     return khash(hashed, self._field_name)
Esempio n. 14
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(_LibraryBitField, self).hash()
     return khash(hashed, self._length, self._signed, self._min_value, self._max_value)
Esempio n. 15
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Repeat, self).hash()
     return khash(hashed, self._min_times, self._max_times, self._step, self._repeats)
Esempio n. 16
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(TakeFrom, self).hash()
     return khash(hashed, self.min_elements, self.max_elements, self.seed)
Esempio n. 17
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(RandomBytes, self).hash()
     return khash(hashed, self._min_length, self._max_length, self._num_mutations, self._step, self._seed)
Esempio n. 18
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(Calculated, self).hash()
     return khash(hashed, self._field_name)
Esempio n. 19
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(TakeFrom, self).hash()
     return khash(hashed, self.min_elements, self.max_elements, self.seed)
Esempio n. 20
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(Dynamic, self).hash()
     return khash(hashed, self._key, self._length)
Esempio n. 21
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(ForEach, self).hash()
     return khash(hashed + self._mutated_field.hash())
Esempio n. 22
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(BitField, self).hash()
     return khash(hashed, self._length, self._signed, self._min_value, self._max_value)
Esempio n. 23
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Pad, self).hash()
     return khash(hashed, self._pad_length, self._pad_data)
Esempio n. 24
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(Dynamic, self).hash()
     return khash(hashed, self._key, self._length)
Esempio n. 25
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     hashed = super(String, self).hash()
     return khash(hashed, self._max_size)
Esempio n. 26
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the condition
     '''
     hashed = super(Compare, self).hash()
     return khash(hashed, self._comp_value, self._comp_type)
Esempio n. 27
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     self._initialize()
     hashed = khash(type(self).__name__, self._default_value, self._fuzzable)
     return hashed
Esempio n. 28
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the field
     '''
     if self._hash is None:
         self._initialize()
         self._hash = khash(type(self).__name__, self._default_value, self._fuzzable)
     return self._hash
Esempio n. 29
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Container, self).hash()
     for f in self._fields:
         f_hashed = f.hash()
         hashed = khash(hashed + f_hashed)
     return hashed
Esempio n. 30
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the container
     '''
     hashed = super(Container, self).hash()
     for f in self._fields:
         f_hashed = f.hash()
         hashed = khash(hashed + f_hashed)
     return hashed
Esempio n. 31
0
File: graph.py Progetto: wflk/kitty
 def hash(self):
     hashed = super(GraphModel, self).hash()
     skeys = sorted(self._graph.keys())
     for key in skeys:
         for conn in self._graph[key]:
             t_hashed = conn.dst.hash()
             self.logger.info('hash of template %s is %s' % (conn.dst.get_name(), t_hashed))
             hashed = khash(hashed, t_hashed)
     self.logger.info('hash of model is %s' % hashed)
     return hashed
Esempio n. 32
0
 def hash(self):
     hashed = super(GraphModel, self).hash()
     skeys = sorted(self._graph.keys())
     for key in skeys:
         for conn in self._graph[key]:
             t_hashed = conn.dst.hash()
             self.logger.info("hash of template %s is %s" % (conn.dst.get_name(), t_hashed))
             hashed = khash(hashed, t_hashed)
     self.logger.info("hash of model is %s" % hashed)
     return hashed
Esempio n. 33
0
 def hash(self):
     hashed = None
     for stage in self._stages:
         hashed = khash(hashed, stage.hash())
     return hashed
Esempio n. 34
0
 def hash(self):
     hashed = super(BlockDuplicate, self).hash()
     return khash(hashed, self._num_dups)
Esempio n. 35
0
 def hash(self):
     hashed = super(RandomBytes, self).hash()
     return khash(hashed, self._min_length, self._max_length, self._num_mutations, self._step, self._seed)
Esempio n. 36
0
 def hash(self):
     hashed = super(Group, self).hash()
     return khash(hashed, frozenset(self._values))
Esempio n. 37
0
 def hash(self):
     hashed = super(String, self).hash()
     return khash(hashed, self._max_size)
Esempio n. 38
0
 def hash(self):
     '''
     :rtype: int
     :return: hash of the condition
     '''
     return khash(type(self).__name__)
Esempio n. 39
0
 def hash(self):
     hashed = super(BitFlip, self).hash()
     return khash(hashed, self._num_bits)
Esempio n. 40
0
 def hash(self):
     hashed = super(Compare, self).hash()
     return khash(hashed, self._comp_value, self._comp_type)
Esempio n. 41
0
 def hash(self):
     hashed = super(ListCondition, self).hash()
     return khash(hashed, len(self._value_list),
                  frozenset(self._value_list))
Esempio n. 42
0
 def hash(self):
     return khash(type(self).__name__)
Esempio n. 43
0
 def hash(self):
     hashed = super(FieldCondition, self).hash()
     return khash(hashed, self._field_name)
Esempio n. 44
0
 def hash(self):
     hashed = super(BitFlip, self).hash()
     return khash(hashed, self._num_bits)
Esempio n. 45
0
 def hash(self):
     hashed = khash(self._strategy, self._seed)
     for t in self._templates:
         hashed = khash(hashed, t.hash())
     return hashed
Esempio n. 46
0
 def hash(self):
     hashed = super(BlockDuplicate, self).hash()
     return khash(hashed, self._num_dups)
Esempio n. 47
0
 def hash(self):
     hashed = None
     for stage in self._stages:
         hashed = khash(hashed, stage.hash())
     return hashed
Esempio n. 48
0
 def hash(self):
     hashed = super(BlockOperation, self).hash()
     return khash(hashed, self._block_size)
Esempio n. 49
0
 def hash(self):
     return khash(self.get_name())
Esempio n. 50
0
 def hash(self):
     hashed = super(ByteFlip, self).hash()
     return khash(hashed, self._num_bytes)
Esempio n. 51
0
 def hash(self):
     self._get_ready()
     hashed = khash(type(self).__name__, self._default_value, self._fuzzable)
     return hashed
Esempio n. 52
0
 def hash(self):
     return khash(self.get_name())
Esempio n. 53
0
 def hash(self):
     hashed = super(BitField, self).hash()
     return khash(hashed, self._length, self._signed, self._min_value, self._max_value)
Esempio n. 54
0
 def hash(self):
     '''
     :return: a hash of the model object (used for notifying change in the model)
     '''
     return khash(type(self).__name__)
Esempio n. 55
0
 def hash(self):
     hashed = super(Dynamic, self).hash()
     return khash(hashed, self._key, self._length)
Esempio n. 56
0
 def hash(self):
     hashed = khash(self._strategy, self._seed)
     for t in self._templates:
         hashed = khash(hashed, t.hash())
     return hashed
Esempio n. 57
0
 def hash(self):
     hashed = super(Calculated, self).hash()
     return khash(hashed, self._field_name)
Esempio n. 58
0
 def hash(self):
     hashed = super(BlockOperation, self).hash()
     return khash(hashed, self._block_size)