Documentation ¶
Index ¶
- func Decrypt(prvKey *ecdsa.PrivateKey, peersPubKey *ecdsa.PublicKey, ciphertext []byte) ([]byte, error)
- func Encrypt(peersPubKey *ecdsa.PublicKey, message []byte) ([]byte, *ecdsa.PublicKey, error)
- func Sign(prvKey *ecdsa.PrivateKey, message []byte) ([]byte, error)
- func Verify(pubKey *ecdsa.PublicKey, message, sig []byte) bool
- type Envelope
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Envelope ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func NewPrivateKey ¶
func NewPrivateKey(prvKey ecdsa.PrivateKey) *PrivateKey
func (PrivateKey) ExtractShareKey ¶
func (p PrivateKey) ExtractShareKey(envelope caesar.Envelope) ([]byte, error)
func (PrivateKey) GetAuthKey ¶
func (p PrivateKey) GetAuthKey() (string, error)
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func (PublicKey) GetAuthKey ¶
func (PublicKey) NewEnvelope ¶
Click to show internal directories.
Click to hide internal directories.