pgp

package module
v0.0.0-...-1c1952d Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

README

pgp

A helper package using openpgp written in Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArmoredKeyToEntity

func ArmoredKeyToEntity(key []byte) (*openpgp.Entity, error)

ArmoredKeyToEntity returns a entity from the given ascii armored key

TODO: decrypt private key if its encrypted

func CheckClearSignedSignature

func CheckClearSignedSignature(buf []byte, entity *openpgp.Entity) (bool, error)

CheckClearSignedSignature checks if the given ascii armored clear signed signature has ben signed by the given entity

func CheckDetachedSignature

func CheckDetachedSignature(message, signature []byte, entity *openpgp.Entity) (bool, error)

CheckDetachedSignature checks if the given ascii armored detached signature for the message has been signed by the given entity

func ClearSignMessage

func ClearSignMessage(message []byte, entity *openpgp.Entity) ([]byte, error)

ClearSignMessage generates a clear-signed message using the private key from the given entity.

func DecryptMessage

func DecryptMessage(message []byte, entity *openpgp.Entity) ([]byte, error)

DecryptMessage decrypts a armored message using the given entity

func DetachSignMessage

func DetachSignMessage(message []byte, entity *openpgp.Entity) ([]byte, error)

DetachSignMessage generates a amored detached sign message using a entity

func EncryptMessage

func EncryptMessage(message []byte, entity *openpgp.Entity) ([]byte, error)

EncryptMessage encrypts a message to a entity and returns the encrypted ascii armored data block

func SerializeEntity

func SerializeEntity(entity *openpgp.Entity) ([]byte, error)

SerializeEntity serializes both the public and private key from a entity. Notice: serializing a encrypted private key is not yet supported!

Types

This section is empty.

Jump to

Keyboard shortcuts

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