Table of Contents

Class AgeIdentityLoader

Namespace
Nops.Core.Keys
Assembly
Nops.Core.dll

Loads age private key identities from either a Bech32 key string ("AGE-SECRET-KEY-...") or a path to a file that contains one or more such keys (for example an age-keygen output file, comments are ignored).

public static class AgeIdentityLoader
Inheritance
AgeIdentityLoader
Inherited Members

Methods

Load(string)

Resolve a single identity spec into zero or more Bech32 private keys. Returns nothing when the spec is neither a key nor an existing file.

public static IEnumerable<string> Load(string spec)

Parameters

spec string

Returns

IEnumerable<string>

LoadFromSopsEnvironment()

Age identities from the same places the sops CLI looks: the SOPS_AGE_KEY variable (key text), the SOPS_AGE_KEY_FILE variable (a path), and sops/age/keys.txt under the user config directory. Missing sources are skipped.

public static IEnumerable<string> LoadFromSopsEnvironment()

Returns

IEnumerable<string>