def hash(self): ''' :rtype: int :return: hash of the field ''' hashed = super(Group, self).hash() return khash(hashed, frozenset(self._values))
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)
def hash(self): ''' :rtype: int :return: hash of the field ''' hashed = super(String, self).hash() return khash(hashed, self._max_size)
def hash(self): ''' :rtype: int :return: hash of the container ''' hashed = super(Conditional, self).hash() return khash(hashed, self._condition.hash())
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)
def hash(self): ''' :rtype: int :return: hash of the container ''' hashed = super(Pad, self).hash() return khash(hashed, self._pad_length, self._pad_data)
def hash(self): ''' :rtype: int :return: hash of the container ''' hashed = super(Trunc, self).hash() return khash(hashed, self._max_size)
def hash(self): ''' :rtype: int :return: hash of the container ''' hashed = super(ForEach, self).hash() return khash(hashed + self._mutated_field.hash())
def hash(self): ''' :rtype: int :return: hash of the condition ''' hashed = super(Compare, self).hash() return khash(hashed, self._comp_value, self._comp_type)
def hash(self): ''' :rtype: int :return: hash of the field ''' hashed = super(Calculated, self).hash() return khash(hashed, self._field_name)
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)
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)
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)
def hash(self): ''' :rtype: int :return: hash of the field ''' hashed = super(Dynamic, self).hash() return khash(hashed, self._key, self._length)
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)
def hash(self): ''' :rtype: int :return: hash of the field ''' self._initialize() hashed = khash(type(self).__name__, self._default_value, self._fuzzable) return hashed
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
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
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
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
def hash(self): hashed = None for stage in self._stages: hashed = khash(hashed, stage.hash()) return hashed
def hash(self): hashed = super(BlockDuplicate, self).hash() return khash(hashed, self._num_dups)
def hash(self): hashed = super(RandomBytes, self).hash() return khash(hashed, self._min_length, self._max_length, self._num_mutations, self._step, self._seed)
def hash(self): hashed = super(Group, self).hash() return khash(hashed, frozenset(self._values))
def hash(self): hashed = super(String, self).hash() return khash(hashed, self._max_size)
def hash(self): ''' :rtype: int :return: hash of the condition ''' return khash(type(self).__name__)
def hash(self): hashed = super(BitFlip, self).hash() return khash(hashed, self._num_bits)
def hash(self): hashed = super(Compare, self).hash() return khash(hashed, self._comp_value, self._comp_type)
def hash(self): hashed = super(ListCondition, self).hash() return khash(hashed, len(self._value_list), frozenset(self._value_list))
def hash(self): return khash(type(self).__name__)
def hash(self): hashed = super(FieldCondition, self).hash() return khash(hashed, self._field_name)
def hash(self): hashed = khash(self._strategy, self._seed) for t in self._templates: hashed = khash(hashed, t.hash()) return hashed
def hash(self): hashed = super(BlockOperation, self).hash() return khash(hashed, self._block_size)
def hash(self): return khash(self.get_name())
def hash(self): hashed = super(ByteFlip, self).hash() return khash(hashed, self._num_bytes)
def hash(self): self._get_ready() hashed = khash(type(self).__name__, self._default_value, self._fuzzable) return hashed
def hash(self): hashed = super(BitField, self).hash() return khash(hashed, self._length, self._signed, self._min_value, self._max_value)
def hash(self): ''' :return: a hash of the model object (used for notifying change in the model) ''' return khash(type(self).__name__)
def hash(self): hashed = super(Dynamic, self).hash() return khash(hashed, self._key, self._length)
def hash(self): hashed = super(Calculated, self).hash() return khash(hashed, self._field_name)