Documentation ¶
Index ¶
- Constants
- Variables
- func Open(out, ciphertext []byte, senderPubKey, recipientPrivKey *Key) (plaintext []byte, err error)
- func Seal(out, plaintext []byte, recipientPubKey, senderPrivKey *Key, rand io.Reader) (ciphertext []byte, err error)
- type Key
- func (key *Key) Bytes() []byte
- func (key *Key) Decrypt(out, ciphertext []byte) (plaintext []byte, err error)
- func (key *Key) Encrypt(out, plaintext []byte, rand io.Reader) (ciphertext []byte, err error)
- func (priv *Key) Sign(out, message []byte) (sig []byte)
- func (pub *Key) Verify(message, sig []byte) bool
Constants ¶
View Source
const EncryptOverhead = 40
View Source
const SignatureOverhead = 64
Variables ¶
View Source
var ErrDecrypt = errors.New("failed to decrypt")
View Source
var ErrOpen = errors.New("failed to open")
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.