|
|
@ -3,9 +3,23 @@ using System.IO; |
|
|
|
|
|
|
|
namespace IPA.AntiMalware |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// An Anti-Malware engine that can be used to scan and detect potentially harmful files.
|
|
|
|
/// </summary>
|
|
|
|
public interface IAntiMalware |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Scans a particular file for malware.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="file">The file to scan.</param>
|
|
|
|
/// <returns>A <see cref="ScanResult"/> indicating whether the file is safe or not.</returns>
|
|
|
|
ScanResult ScanFile(FileInfo file); |
|
|
|
/// <summary>
|
|
|
|
/// Scans a particular in-memory blob for malware.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="data">The binary blob to scan.</param>
|
|
|
|
/// <param name="contentName">The name of the content. If this is left <see langword="null"/>, one will be automatically generated.</param>
|
|
|
|
/// <returns>A <see cref="ScanResult"/> indicating whether the file is safe or not.</returns>
|
|
|
|
ScanResult ScanData(byte[] data, string? contentName = null); |
|
|
|
} |
|
|
|
} |