Documentation ¶
Index ¶
- func Headers(filename string) (headers []string, err error)
- func OpenAppend(name string) (f *os.File, err error)
- func OpenCreate(name string) (f *os.File, err error)
- type Pubring
- func (p Pubring) Candidates(minlat, maxlat int, minrel float32, exit bool) (c []string)
- func (p Pubring) Count() int
- func (p Pubring) Get(ref string) (r Remailer, err error)
- func (p *Pubring) HaveStats() bool
- func (p *Pubring) ImportPubring() (err error)
- func (p *Pubring) ImportStats() (err error)
- func (p Pubring) KeyList() (addresses []string)
- func (p *Pubring) KeyRefresh() bool
- func (p Pubring) Put(r Remailer)
- func (p *Pubring) StatRefresh() (refresh bool)
- func (p *Pubring) StatsStale(h int) bool
- func (p *Pubring) UseExpired()
- type Remailer
- type Secring
- func (s *Secring) Count() int
- func (s *Secring) Get(keyid string) (sec secret, err error)
- func (s *Secring) GetSK(keyid string) (sk []byte, err error)
- func (s *Secring) ImportSecring() (err error)
- func (s *Secring) Insert(pub, sec []byte) (keyidstr string)
- func (s *Secring) ListKeyids() (keyids []string)
- func (s *Secring) Purge() (active, expiring, expired, purged int)
- func (s *Secring) SetAddress(addy string)
- func (s *Secring) SetExit(exit bool)
- func (s *Secring) SetName(name string)
- func (s *Secring) SetValidity(valid, grace int)
- func (s *Secring) SetVersion(v string)
- func (s *Secring) WriteMyKey(filename string) (keyidstr string)
- func (s *Secring) WritePublic(pub []byte, keyidstr string)
- func (s *Secring) WriteSecret(keyidstr string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenAppend ¶
OpenAppend opens a file in Append mode and sets user-only permissions
Types ¶
type Pubring ¶
type Pubring struct {
// contains filtered or unexported fields
}
func NewPubring ¶
func (Pubring) Candidates ¶
Candidates provides a list of remailer addresses that match the specified criteria
func (*Pubring) ImportPubring ¶
ImportPubring reads a YAMN Pubring.mix file
func (*Pubring) ImportStats ¶
ImportStats reads an mlist2.txt style file into a Pubring struct
func (*Pubring) KeyRefresh ¶
KeyRefresh returns True if the Pubring file has been modified
func (*Pubring) StatRefresh ¶
StatRefresh returns True if the mlist2.txt file has been modified
func (*Pubring) StatsStale ¶
StatsStale returns true if stats are over h hours old
func (*Pubring) UseExpired ¶
func (p *Pubring) UseExpired()
type Secring ¶
type Secring struct {
// contains filtered or unexported fields
}
func NewSecring ¶
NewSecring is a constructor for the Secret Keyring
func (*Secring) ImportSecring ¶
ImportSecring reads a YAML secring.mix file into memory
func (*Secring) ListKeyids ¶
ListKeyids returns a string slice of all in-memory secret keyids
func (*Secring) SetAddress ¶
SetAddress validates and sets the remailer address
func (*Secring) SetValidity ¶
SetValidity defines the time duration over which a key is deemed valid
func (*Secring) SetVersion ¶
SetVersion sets the version string used on keys
func (*Secring) WriteMyKey ¶
WriteMyKey writes the local public key to filename with current configurtaion settings.
func (*Secring) WritePublic ¶
WritePublic writes the Public Key to disk.
func (*Secring) WriteSecret ¶
WriteSecret adds the selected secret key to the secret keyring file