conan.tools.files checksums๏ƒ

conan.tools.files.check_md5()๏ƒ

check_md5(conanfile, file_path, signature)๏ƒ

Check that the specified MD5 hash of the file_path matches the actual hash. If doesnโ€™t match it will raise a ConanException.

Parameters:
  • conanfile โ€“ The current recipe object. Always use self.

  • file_path โ€“ Path of the file to check.

  • signature โ€“ Expected MD5 hash.

conan.tools.files.check_sha1()๏ƒ

check_sha1(conanfile, file_path, signature)๏ƒ

Check that the specified SHA-1 hash of the file_path matches the actual hash. If doesnโ€™t match it will raise a ConanException.

Parameters:
  • conanfile โ€“ Conanfile object.

  • file_path โ€“ Path of the file to check.

  • signature โ€“ Expected SHA-1 hash.

conan.tools.files.check_sha256()๏ƒ

check_sha256(conanfile, file_path, signature)๏ƒ

Check that the specified SHA-256 hash of the file_path matches the actual hash. If doesnโ€™t match it will raise a ConanException.

Parameters:
  • conanfile โ€“ Conanfile object.

  • file_path โ€“ Path of the file to check.

  • signature โ€“ Expected SHA-256 hash.