# eric7.WebBrowser.SafeBrowsing.SafeBrowsingThreatList

Module implementing the threat list info class.

### Global Attributes

None

### Classes

HashPrefixList | Class implementing a container for threat list data.
ThreatList | Class implementing the threat list info.

### Functions

None

## HashPrefixList

Class implementing a container for threat list data.

### Derived from

None

### Class Attributes

None

### Class Methods

None

### Methods

HashPrefixList | Constructor
__iter__ | Special method to iterate over the raw hashes.
__len__ | Special method to calculate the number of entries.

### Static Methods

None

#### HashPrefixList (Constructor)

HashPrefixList(prefixLength, rawHashes)

Constructor

prefixLength (int)
  length of each hash prefix
rawHashes (str)
  raw hash prefixes of given length concatenated and sorted in lexicographical order

#### HashPrefixList.__iter__

__iter__()

Special method to iterate over the raw hashes.

Return:
  iterator object

Return Type:
  iterator

#### HashPrefixList.__len__

__len__()

Special method to calculate the number of entries.

Return:
  length

Return Type:
  int

Up

## ThreatList

Class implementing the threat list info.

### Derived from

None

### Class Attributes

None

### Class Methods

fromApiEntry | Class method to instantiate a threat list given a threat list entry dictionary.

### Methods

ThreatList | Constructor
__repr__ | Special method to generate a printable representation.
asTuple | Public method to convert the object to a tuple.

### Static Methods

None

#### ThreatList.fromApiEntry (class method)

fromApiEntry(entry)

Class method to instantiate a threat list given a threat list entry dictionary.

entry (dict)
  threat list entry dictionary

Return:
  instantiated object

Return Type:
  ThreatList

#### ThreatList (Constructor)

ThreatList(threatType, platformType, threatEntryType)

Constructor

threatType (str)
  threat type
platformType (str)
  platform type
threatEntryType (str)
  threat entry type

#### ThreatList.__repr__

__repr__()

Special method to generate a printable representation.

Return:
  printable representation

Return Type:
  str

#### ThreatList.asTuple

asTuple()

Public method to convert the object to a tuple.

Return:
  tuple containing the threat list info

Return Type:
  tuple of (str, str, str)

Up