frostfs-sdk-csharp/src/FrostFS.SDK.ClientV2/Models/Misc/CheckSum.cs
Pavel Gross 6562aa27a5
All checks were successful
DCO / DCO (pull_request) Successful in 33s
[#23] Client: Refactoring to optimize memory usage
Signed-off-by: Pavel Gross <p.gross@yando.com>
2024-09-11 10:58:00 +03:00

20 lines
No EOL
404 B
C#

using FrostFS.SDK.Cryptography;
using System;
namespace FrostFS.SDK;
public class CheckSum
{
// type is always Sha256
public byte[]? Hash { get; set; }
public static CheckSum CreateCheckSum(byte[] content)
{
return new CheckSum { Hash = content.Sha256() };
}
public override string ToString()
{
return BitConverter.ToString(Hash).Replace("-", "");
}
}