20 lines
No EOL
378 B
C#
20 lines
No EOL
378 B
C#
using System.Security.Cryptography;
|
|
|
|
using FrostFS.SDK.Cryptography;
|
|
|
|
namespace FrostFS.SDK.ModelsV2;
|
|
|
|
public class OwnerId(string id)
|
|
{
|
|
public string Value { get; } = id;
|
|
|
|
public static OwnerId FromKey(ECDsa key)
|
|
{
|
|
return new OwnerId(key.PublicKey().PublicKeyToAddress());
|
|
}
|
|
|
|
public byte[] ToHash()
|
|
{
|
|
return Base58.Decode(Value);
|
|
}
|
|
} |