keychain

package
v1.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagUserPresent  = 0x01
	FlagUserVerified = 0x04
)

Variables

This section is empty.

Functions

func CompanionMetadata added in v1.0.12

func CompanionMetadata(inner map[string]any) (title, note, totp string)

func CompanionSites added in v1.0.13

func CompanionSites(inner map[string]any) []string

func DecodeCompanionInner added in v1.0.9

func DecodeCompanionInner(data []byte) map[string]any

func EncodeCompanionInner added in v1.0.12

func EncodeCompanionInner(inner map[string]any) ([]byte, error)

func EncodeCompanionItem added in v1.0.9

func EncodeCompanionItem(srvr, username string, inner map[string]any) ([]byte, error)

func EncodeItemRenamed added in v1.0.9

func EncodeItemRenamed(attrs map[string]any, newSrvr, newAcct string, secret []byte) ([]byte, error)

func EncodeItemRestored added in v1.0.13

func EncodeItemRestored(attrs map[string]any, agrp string, secret []byte) ([]byte, error)

func EncodeItemWithSecret added in v1.0.9

func EncodeItemWithSecret(attrs map[string]any, secret []byte) ([]byte, error)

func EncodeMetadataItem added in v1.0.9

func EncodeMetadataItem(srvr, username, title, note string) ([]byte, error)

func EncodeSiteAssociations added in v1.0.13

func EncodeSiteAssociations(domains []string) []any

func EncodeTOTPField added in v1.0.9

func EncodeTOTPField(otpauthURL string) (map[string]any, error)

func EncodeWebPasswordItem added in v1.0.9

func EncodeWebPasswordItem(srvr, username, password string) ([]byte, error)

func IsWebsiteDomain added in v1.0.14

func IsWebsiteDomain(srvr string) bool

func TOTPCode

func TOTPCode(otpAuthURL string, t time.Time) (string, error)

Types

type DeletedRef added in v1.0.9

type DeletedRef struct {
	RecordName string
	RecordEtag string
}

type Group added in v1.0.10

type Group struct {
	ID   string
	Name string
}

func Groups added in v1.0.10

func Groups(items []Item) []Group

type Item

type Item struct {
	Class string
	Agrp  string
	Srvr  string
	Acct  string
	Labl  string
	Attrs map[string]any
	Data  []byte
	Name  string
	Etag  string
}

type Passkey added in v1.0.9

type Passkey struct {
	RelyingParty string
	Title        string
	UserName     string
	DisplayName  string
	CredentialID []byte
	UserHandle   []byte
	PrivateKey   *ecdsa.PrivateKey
	Created      time.Time
	Modified     time.Time
	IsDeleted    bool
	DeletedAt    time.Time
	Record       DeletedRef
}

func Passkeys added in v1.0.9

func Passkeys(items []Item) []Passkey

func (Passkey) Sign added in v1.0.9

func (p Passkey) Sign(clientDataHash []byte, flags byte, signCount uint32) (authenticatorData, signature []byte, err error)

type WebPassword

type WebPassword struct {
	Name        string
	Domain      string
	Domains     []string
	MergedHosts []string
	Website     bool
	Username    string
	Password    string
	TOTP        string
	Note        string
	Created     time.Time
	Modified    time.Time
	IsDeleted   bool
	DeletedAt   time.Time
	Deleted     []DeletedRef
	Groups      []Group
	Shared      bool
}

func WebPasswords

func WebPasswords(items []Item) []WebPassword

func (WebPassword) IconURL added in v1.0.1

func (w WebPassword) IconURL() string

func (WebPassword) TOTPCode

func (w WebPassword) TOTPCode(t time.Time) (string, error)

type WiFiPassword added in v1.0.3

type WiFiPassword struct {
	SSID     string
	Password string
	Created  time.Time
	Modified time.Time
}

func WiFiPasswords added in v1.0.3

func WiFiPasswords(items []Item) []WiFiPassword

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL