pgp

package
v0.0.0-...-1ad4281 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateKey

type PrivateKey string

PrivateKey Key

func NewKey

func NewKey(name, userStr string) (*PrivateKey, error)

NewKey Generates a new Curve25519 Pgp key

func (*PrivateKey) DecodeMsg

func (z *PrivateKey) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*PrivateKey) DecryptArmored

func (pk *PrivateKey) DecryptArmored(armored string) ([]byte, error)

DecryptArmored data with private key

func (PrivateKey) EncodeMsg

func (z PrivateKey) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (PrivateKey) MarshalMsg

func (z PrivateKey) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (PrivateKey) Msgsize

func (z PrivateKey) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*PrivateKey) PublicKey

func (pk *PrivateKey) PublicKey() (*PublicKey, error)

PublicKey of Private Key

func (*PrivateKey) ToString

func (k *PrivateKey) ToString() string

func (*PrivateKey) UnmarshalMsg

func (z *PrivateKey) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type PublicKey

type PublicKey string

PublicKey Key

func (*PublicKey) DecodeMsg

func (z *PublicKey) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (PublicKey) EncodeMsg

func (z PublicKey) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*PublicKey) EncryptArmored

func (pk *PublicKey) EncryptArmored(data []byte) (string, error)

EncryptArmored encrypt data with public key

func (PublicKey) MarshalMsg

func (z PublicKey) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (PublicKey) Msgsize

func (z PublicKey) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*PublicKey) ToString

func (k *PublicKey) ToString() string

func (*PublicKey) UnmarshalMsg

func (z *PublicKey) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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