frostfs-sdk-csharp/sdk/src/FrostFS.SDK.Cryptography/UUID.cs
Ivan Pchelintsev 2800fff041 [#1] Define SDK structure
TODO: Вынести маппинг модель -> grpc в отдельный слой

Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
2024-05-22 14:29:17 +03:00

17 lines
400 B
C#

using Google.Protobuf;
namespace FrostFS.SDK.Cryptography
{
public static class UUIDExtension
{
public static Guid ToUuid(this ByteString id)
{
return Guid.Parse(Convert.ToHexString(id.ToByteArray()));
}
public static byte[] ToBytes(this Guid id)
{
return Convert.FromHexString(id.ToString("N"));
}
}
}