Files
HackBrowserData/internal/keychain/keychain.go
T
Roger f36790d4dd refactor: pass secrets as values, fetched once per scope (#713)
* refactor: pass secrets as values, fetched once per scope

A master key travelled through five layers of function values and three
sync.Once guarded reuse; holding each secret where its scope lives shows
where it comes from. Only the keychain prompt still waits for first use.

* docs(rfcs): fetch secrets per extraction, not per record
2026-11-22 23:52:12 +08:00

22 lines
537 B
Go

// Package keychain owns the user's macOS login keychain: one handle per run, opened on first use.
package keychain
import (
"context"
"time"
)
// PasswordFunc yields the login password; "" means none was supplied.
type PasswordFunc func(ctx context.Context) (string, error)
// InternetPassword is one internet password item; Password is empty while the keychain stays locked.
type InternetPassword struct {
Protocol string
Server string
Port uint32
Path string
Account string
Password string
Created time.Time
}