Files
UVtools/UVtools.Core/Objects/StaticObjects.cs
T
Tiago Conceição 98b7c01df8 v2.13.2
- (Upgrade) AvaloniaUI from 0.10.5 to 0.10.6
- (Add) Pixel editor - Text: Allow multi-line text and line alignment modes
2021-06-06 01:26:59 +01:00

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);
}
}
}