pgp

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service manages pgp keys and verification

func New

func New(db *database.Database, serverURL *url.URL) *Service

New creates a new pgp service

func (*Service) AddUserPGPKey

func (service *Service) AddUserPGPKey(userID uint, key, proof string) error

AddUserPGPKey associates a PGP key with the user, if the proof is valid.

func (*Service) ExpectedPGPKeyProofText

func (service *Service) ExpectedPGPKeyProofText(userID uint) string

ExpectedPGPKeyProofText returns the expected PGP Key ownership proof text. for a given user.

func (*Service) GetUserPGPKeys

func (service *Service) GetUserPGPKeys(userID uint) ([]*models.PGPKey, error)

GetUserPGPKeys returns all PGP Keys associated with a user

func (*Service) IdentifySigner

func (service *Service) IdentifySigner(message io.Reader) (uint, error)

IdentifySigner will identify the user that has signed the given clearsigned message.

func (*Service) RemovePGPKey

func (service *Service) RemovePGPKey(id uint, userID uint) error

RemovePGPKey removes the PGP Key with a matching userID and ID

Jump to

Keyboard shortcuts

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