[#1] Define SDK structure

TODO: Вынести маппинг модель -> grpc в отдельный слой

Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
Ivan Pchelintsev 2024-05-02 11:18:44 +03:00
parent 905f683bf1
commit 2800fff041
57 changed files with 5760 additions and 0 deletions

View file

@ -0,0 +1,24 @@
using System.Runtime.CompilerServices;
namespace FrostFS.SDK.Cryptography
{
internal static class ArrayHelper
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static byte[] Concat(params byte[][] buffers)
{
int length = 0;
for (int i = 0; i < buffers.Length; i++)
length += buffers[i].Length;
byte[] dst = new byte[length];
int p = 0;
foreach (byte[] src in buffers)
{
Buffer.BlockCopy(src, 0, dst, p, src.Length);
p += src.Length;
}
return dst;
}
}
}