Table of Contents

Class SecretStorageService

Namespace
NLightning.Bolts.BOLT3.Services
Assembly
NLightning.Bolts.dll

Provides efficient storage of per-commitment secrets

public class SecretStorageService : IDisposable
Inheritance
SecretStorageService
Implements
Inherited Members

Fields

SECRET_SIZE

public const int SECRET_SIZE = 32

Field Value

int

Methods

DeriveOldSecret(ulong, Span<byte>)

Derives an old secret from a known higher-level secret

public void DeriveOldSecret(ulong index, Span<byte> derivedSecret)

Parameters

index ulong
derivedSecret Span<byte>

Dispose()

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

public void Dispose()

~SecretStorageService()

protected ~SecretStorageService()

InsertSecret(ReadOnlySpan<byte>, ulong)

Inserts a new secret and verifies it against existing secrets

public bool InsertSecret(ReadOnlySpan<byte> secret, ulong index)

Parameters

secret ReadOnlySpan<byte>
index ulong

Returns

bool