Skip to content

Commit

Permalink
Add hexpubvar variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxhy committed Mar 22, 2024
1 parent b7c43b5 commit 59ef681
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions KeyManager.Library/KeyStore/KeyStore.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Leosac.KeyManager.Library.DivInput;
using Newtonsoft.Json;
using System.Text;

namespace Leosac.KeyManager.Library.KeyStore
{
Expand All @@ -13,6 +14,7 @@ public abstract class KeyStore
public const string ATTRIBUTE_NAME = "name";
public const string ATTRIBUTE_HEXNAME = "hexname";
public const string ATTRIBUTE_PUBVAR = "pubvar";
public const string ATTRIBUTE_HEXPUBVAR = "hexpubvar";

protected readonly JsonSerializerSettings _jsonSettings;

Expand Down Expand Up @@ -265,6 +267,7 @@ public virtual async Task Publish(KeyStore store, Func<string, KeyStore?> getFav
if (!string.IsNullOrEmpty(Options?.PublishVariable))
{
Attributes[ATTRIBUTE_PUBVAR] = Options.PublishVariable;
Attributes[ATTRIBUTE_HEXPUBVAR] = Convert.ToHexString(Encoding.UTF8.GetBytes(Options.PublishVariable));
}

foreach (var id in ids)
Expand Down

0 comments on commit 59ef681

Please sign in to comment.