encryption

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

encrpytion package holds all pgp related tasks

Index

Constants

This section is empty.

Variables

View Source
var KeyRing = MyEntityList{}

Functions

func Decrypt

func Decrypt(w http.ResponseWriter, rc http.Request) (error, http.Request)

Decrypt decrypt the given string.

func DeleteKey

func DeleteKey(w http.ResponseWriter, rc http.Request) (error, http.Request)

DeleteKey deletes a key by id from the system

func Encrypt

func Encrypt(w http.ResponseWriter, rc http.Request) (error, http.Request)

Encrypt encrypt the given string.

func GetKey

func GetKey(w http.ResponseWriter, rc http.Request) (error, http.Request)

func ListKeys

func ListKeys(w http.ResponseWriter, rc http.Request) (error, http.Request)

ListKeys return json list of keys with metadata including id.

func NewKey

func NewKey(w http.ResponseWriter, rc http.Request) (error, http.Request)

NewKey will create a new private/public gpg key pair and return the private key id and public key.

func SetMyKeyRing

func SetMyKeyRing(w http.ResponseWriter, rc http.Request) (error, http.Request)

Types

type MyEntityList

type MyEntityList struct {
	openpgp.EntityList
}

func (*MyEntityList) GetKeyRing

func (KeyRing *MyEntityList) GetKeyRing()

GetKeyRing return pgp keyring from a file location

type PublicKey

type PublicKey struct {
	Id     string `json:"id"`
	PubKey string `json:"pubkey"`
}

Jump to

Keyboard shortcuts

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