Table of Contents

Interface IMasterKeyProvider

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

Interface for master key providers (age, PGP, KMS, etc.). Each provider knows how to decrypt the data key share encrypted under its key.

public interface IMasterKeyProvider

Properties

KeyType

Key type identifier (e.g., "age", "pgp", "aws_kms", "gcp_kms", "azure_kv", "hc_vault").

string KeyType { get; }

Property Value

string

Methods

DecryptShareAsync(string, CancellationToken)

Decrypt the encrypted data key share using this master key. Returns null if this key cannot decrypt the share.

Task<byte[]?> DecryptShareAsync(string enc, CancellationToken ct = default)

Parameters

enc string
ct CancellationToken

Returns

Task<byte[]>