[#13] Client: Use code analyzers
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
d7dbbf8da8
commit
d1271df207
102 changed files with 2168 additions and 733 deletions
|
@ -1,17 +1,19 @@
|
|||
using Google.Protobuf;
|
||||
using Org.BouncyCastle.Crypto.Digests;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
|
||||
using Google.Protobuf;
|
||||
|
||||
using Org.BouncyCastle.Crypto.Digests;
|
||||
|
||||
namespace FrostFS.SDK.Cryptography;
|
||||
|
||||
public static class Extentions
|
||||
{
|
||||
private static readonly SHA256 _sha256 = SHA256.Create();
|
||||
private static SpinLock _spinlockSha256 = new();
|
||||
private static SpinLock _spinlockSha256;
|
||||
|
||||
private static readonly SHA512 _sha512 = SHA512.Create();
|
||||
private static SpinLock _spinlockSha512 = new();
|
||||
private static SpinLock _spinlockSha512;
|
||||
|
||||
internal static byte[] RIPEMD160(this byte[] value)
|
||||
{
|
||||
|
@ -22,7 +24,7 @@ public static class Extentions
|
|||
digest.DoFinal(hash, 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
||||
public static ByteString Sha256(this IMessage data)
|
||||
{
|
||||
return ByteString.CopyFrom(data.ToByteArray().Sha256());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue