Table of Contents

Class LocalDeriveKmsProvider

Namespace
FishMMO.Auth.Implementation
Assembly
FishMMO-AuthShared.dll

Local fallback IKmsProvider implementation that derives keys via HMAC-SHA256 from a long-lived root key. This is the legacy behaviour and is exposed here for parity; production deployments should swap in a hardware-backed implementation.

public sealed class LocalDeriveKmsProvider : IKmsProvider, IDisposable
Inheritance
LocalDeriveKmsProvider
Implements
Inherited Members

Constructors

LocalDeriveKmsProvider(byte[])

public LocalDeriveKmsProvider(byte[] rootKey)

Parameters

rootKey byte[]

Methods

DeriveKey(string)

Derives or unwraps a 32-byte symmetric key for the given context. Callers should zero the returned buffer with ZeroMemory(Span<byte>) as soon as the operation completes.

public byte[] DeriveKey(string context)

Parameters

context string

Stable application-defined key identifier (e.g. "totp-master-key-v1").

Returns

byte[]

Cleartext 32-byte key material.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()