All checks were successful
DCO / DCO (pull_request) Successful in 33s
Signed-off-by: Pavel Gross <p.gross@yando.com>
20 lines
No EOL
404 B
C#
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("-", "");
|
|
}
|
|
} |