(Image img, string expectedHash, ref int success)
| 10 | public const int ExitFailure = 1; |
| 11 | |
| 12 | public static int CheckHash(Image img, string expectedHash, ref int success) |
| 13 | { |
| 14 | HashImageFilter hasher = new HashImageFilter(); |
| 15 | string actualHash = hasher.Execute(img); |
| 16 | if (actualHash != expectedHash) |
| 17 | { |
| 18 | success = ExitFailure; |
| 19 | Console.WriteLine("Expected hash: \"{0}\" actual hash: \"{1}\".", expectedHash, actualHash ); |
| 20 | } |
| 21 | return 0; |
| 22 | } |
| 23 | |
| 24 | /// <summary>Main entry point.</summary> |
| 25 | public static int Main (string[] args) { |