IrohBeam.SecretKey (iroh_beam v0.2.0)

View Source

Opaque private endpoint identity.

Inspection is always redacted. export/1 is the only API that returns the 32 private bytes and should be used only for explicit key-manager integration.

Summary

Types

t()

@opaque t()

Functions

endpoint_id(secret_key)

@spec endpoint_id(t()) ::
  {:ok, IrohBeam.EndpointId.t()} | {:error, IrohBeam.Error.t()}

export(secret_key)

@spec export(t()) :: {:ok, binary()} | {:error, IrohBeam.Error.t()}

from_bytes(bytes)

@spec from_bytes(binary()) :: {:ok, t()} | {:error, IrohBeam.Error.t()}

generate()

@spec generate() :: {:ok, t()} | {:error, IrohBeam.Error.t()}

load_or_create(path)

@spec load_or_create(Path.t()) :: {:ok, t()} | {:error, IrohBeam.Error.t()}