Class AgeMasterKey
Master key provider for age (age-encryption.org/v1) keys. Decrypts X25519 recipients (what sops uses to wrap its data key); passphrase, post-quantum and plugin recipients are not supported.
public class AgeMasterKey : IMasterKeyProvider
- Inheritance
-
AgeMasterKey
- Implements
- Inherited Members
Constructors
AgeMasterKey(string)
Creates an age master key from a private key.
public AgeMasterKey(string privateKey)
Parameters
privateKeystringThe age private key (Bech32 string starting with "AGE-SECRET-KEY-1...").
Properties
KeyType
The key type identifier ("age").
public string KeyType { get; }
Property Value
PrivateKey
The age private key (Bech32 string starting with "AGE-SECRET-KEY-1...").
public string PrivateKey { get; }
Property Value
Methods
DecryptShareAsync(string, CancellationToken)
Decrypt the encrypted data key share using age. Returns null if this key cannot decrypt it: the private key is not valid or the file is not addressed to it. A malformed or tampered age blob throws InvalidDataException.
public Task<byte[]?> DecryptShareAsync(string enc, CancellationToken ct = default)
Parameters
encstringctCancellationToken