mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-11 19:12:31 +02:00
98b7c01df8
- (Upgrade) AvaloniaUI from 0.10.5 to 0.10.6 - (Add) Pixel editor - Text: Allow multi-line text and line alignment modes
21 lines
525 B
C#
21 lines
525 B
C#
using System;
|
|
using System.IO;
|
|
using System.Security.Cryptography;
|
|
|
|
namespace UVtools.Core.Objects
|
|
{
|
|
public static class StaticObjects
|
|
{
|
|
public static readonly SHA256 Sha256 = SHA256.Create();
|
|
|
|
public static readonly string[] LineBreakCharacters = {"\r\n", "\r", "\n"};
|
|
|
|
// Compute the file's hash.
|
|
public static byte[] GetHashSha256(string filename)
|
|
{
|
|
using var stream = File.OpenRead(filename);
|
|
return Sha256.ComputeHash(stream);
|
|
}
|
|
}
|
|
}
|