C# Класс Google.SafeBrowsing.API

Google Safe Browsing API v2. Does not support MAC authentication. REKEY not supported. Only supports 32bit key sizes. http://code.google.com/intl/cs-CZ/apis/safebrowsing/developers_guide_v2.html
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
API ( string apiKey ) : System
GenerateCombinations ( CanonicalURL url ) : IEnumerable

Generate valid url combinations that have to be checked againts the database

GetChunkData ( string chunkURL, string listName ) : IEnumerable

This is used by clients who want to get new data for known list types. Step 2/2 - called for each Chunk redirect. Download chunk content.

GetFullHashes ( CanonicalURL targetURL ) : IEnumerable

A client may request the list of full-length hashes for a hash prefix. This usually occurs when a client is about to download content from a url whose calculated hash starts with a prefix listed in a blacklist.

GetListData ( string list, IEnumerable whilelist, IEnumerable blacklist ) : ListData

This is used by clients who want to get new data for known list types. Step 1/2. Get chunk URLs redirects for ALL chunks Only supports data for one list at the time (which is not a problem for our implementation since we always only request from one list)

GetLists ( ) : IEnumerable

This is used by clients to discover the available list types.

Приватные методы

Метод Описание
ComputeHash ( CanonicalURL url ) : byte[]
DecodeNumber ( byte buffer, int startPosition, int &endPosition ) : Int32
IsIpAddress ( string hostname ) : bool
ParseChunkData ( Stream stream, string listName ) : IEnumerable
ParseFullHashes ( Stream stream ) : IEnumerable
ParseIntervals ( string input ) : IEnumerable
ParseListData ( Stream stream ) : ListData
PrintIntervals ( IEnumerable list, string listName ) : string
ReadNumber ( byte buffer, int startPosition, int &endPosition ) : Int32
SplitHost ( string url ) : IEnumerable
SplitPath ( string url ) : IEnumerable

Описание методов

API() публичный Метод

public API ( string apiKey ) : System
apiKey string
Результат System

GenerateCombinations() публичный Метод

Generate valid url combinations that have to be checked againts the database
public GenerateCombinations ( CanonicalURL url ) : IEnumerable
url CanonicalURL Canonical URL
Результат IEnumerable

GetChunkData() публичный Метод

This is used by clients who want to get new data for known list types. Step 2/2 - called for each Chunk redirect. Download chunk content.
public GetChunkData ( string chunkURL, string listName ) : IEnumerable
chunkURL string URL returned from GetListData
listName string
Результат IEnumerable

GetFullHashes() публичный Метод

A client may request the list of full-length hashes for a hash prefix. This usually occurs when a client is about to download content from a url whose calculated hash starts with a prefix listed in a blacklist.
public GetFullHashes ( CanonicalURL targetURL ) : IEnumerable
targetURL CanonicalURL
Результат IEnumerable

GetListData() публичный Метод

This is used by clients who want to get new data for known list types. Step 1/2. Get chunk URLs redirects for ALL chunks Only supports data for one list at the time (which is not a problem for our implementation since we always only request from one list)
public GetListData ( string list, IEnumerable whilelist, IEnumerable blacklist ) : ListData
list string list name
whilelist IEnumerable
blacklist IEnumerable all blacklist chunks already available localy
Результат ListData

GetLists() публичный Метод

This is used by clients to discover the available list types.
public GetLists ( ) : IEnumerable
Результат IEnumerable