You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
1.0 KiB

#nullable enable
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);
}
}