[#1] Move files to top level directory

Signed-off-by: Ivan Pchelintsev <i.pchelintsev@yadro.com>
This commit is contained in:
Ivan Pchelintsev 2024-05-16 10:23:38 +03:00
parent 013d8a8436
commit 11eff4e23e
76 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,30 @@
using System.Security.Cryptography;
namespace FrostFS.SDK.Cryptography.Tz
{
public static class Helper
{
public static ulong NextUlong(this RandomNumberGenerator rng)
{
var buff = new byte[8];
rng.GetBytes(buff);
return BitConverter.ToUInt64(buff, 0);
}
public static int GetLeadingZeros(ulong value)
{
var i = 64;
while (value != 0)
{
value >>= 1;
i--;
}
return i;
}
public static int GetNonZeroLength(this ulong value)
{
return 64 - GetLeadingZeros(value);
}
}
}