Documentation
¶
Index ¶
- Variables
- func B2SumHex(data string) string
- type KeyPair
- func (keys *KeyPair) DecryptAndVerify(data []byte) ([]byte, []byte, error)
- func (keys *KeyPair) LoadFile(fname string) error
- func (keys *KeyPair) Pubkey() []byte
- func (keys *KeyPair) Regen()
- func (keys *KeyPair) SaveFile(fname string) error
- func (keys *KeyPair) SessionID() string
- func (keys *KeyPair) SignAndEncrypt(recipX, data []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadSeedSize = errors.New("bad seed size")
View Source
var ErrDecryptError = errors.New("failed to decrypt")
View Source
var ErrEncryptError = errors.New("failed to encrypt")
Functions ¶
Types ¶
type KeyPair ¶
type KeyPair struct {
// contains filtered or unexported fields
}
func (*KeyPair) DecryptAndVerify ¶
/ DecryptAndVerify takes a raw message and decrypts the outer message, verifies the inner message's signature and then returns the plaintext and the sender's pubkey
Click to show internal directories.
Click to hide internal directories.