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

  1. #nullable enable
  2. using System.IO;
  3. namespace IPA.AntiMalware
  4. {
  5. /// <summary>
  6. /// An Anti-Malware engine that can be used to scan and detect potentially harmful files.
  7. /// </summary>
  8. public interface IAntiMalware
  9. {
  10. /// <summary>
  11. /// Scans a particular file for malware.
  12. /// </summary>
  13. /// <param name="file">The file to scan.</param>
  14. /// <returns>A <see cref="ScanResult"/> indicating whether the file is safe or not.</returns>
  15. ScanResult ScanFile(FileInfo file);
  16. /// <summary>
  17. /// Scans a particular in-memory blob for malware.
  18. /// </summary>
  19. /// <param name="data">The binary blob to scan.</param>
  20. /// <param name="contentName">The name of the content. If this is left <see langword="null"/>, one will be automatically generated.</param>
  21. /// <returns>A <see cref="ScanResult"/> indicating whether the file is safe or not.</returns>
  22. ScanResult ScanData(byte[] data, string? contentName = null);
  23. }
  24. }