[#40] Client: Add memory optimization for hash
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
32a7e64538
commit
809bd90352
17 changed files with 170 additions and 64 deletions
|
@ -18,7 +18,7 @@ namespace FrostFS.SDK.Tests;
|
|||
public abstract class ServiceBase(string key)
|
||||
{
|
||||
public string StringKey { get; private set; } = key;
|
||||
public ECDsa Key { get; private set; } = key.LoadWif();
|
||||
public ClientKey Key { get; private set; } = new ClientKey(key.LoadWif());
|
||||
public FrostFsVersion Version { get; set; } = DefaultVersion;
|
||||
public FrostFsPlacementPolicy PlacementPolicy { get; set; } = DefaultPlacementPolicy;
|
||||
|
||||
|
@ -44,21 +44,21 @@ public abstract class ServiceBase(string key)
|
|||
{
|
||||
MetaSignature = new Refs.Signature
|
||||
{
|
||||
Key = ByteString.CopyFrom(Key.PublicKey()),
|
||||
Key = Key.PublicKeyProto,
|
||||
Scheme = Refs.SignatureScheme.EcdsaRfc6979Sha256,
|
||||
Sign = Key.SignData(response.MetaHeader.ToByteArray())
|
||||
Sign = Key.ECDsaKey.SignData(response.MetaHeader.ToByteArray())
|
||||
},
|
||||
BodySignature = new Refs.Signature
|
||||
{
|
||||
Key = ByteString.CopyFrom(Key.PublicKey()),
|
||||
Key = Key.PublicKeyProto,
|
||||
Scheme = Refs.SignatureScheme.EcdsaRfc6979Sha256,
|
||||
Sign = Key.SignData(response.GetBody().ToByteArray())
|
||||
Sign = Key.ECDsaKey.SignData(response.GetBody().ToByteArray())
|
||||
},
|
||||
OriginSignature = new Refs.Signature
|
||||
{
|
||||
Key = ByteString.CopyFrom(Key.PublicKey()),
|
||||
Key = Key.PublicKeyProto,
|
||||
Scheme = Refs.SignatureScheme.EcdsaRfc6979Sha256,
|
||||
Sign = Key.SignData([])
|
||||
Sign = Key.ECDsaKey.SignData(ReadOnlyMemory<byte>.Empty)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue