MCPcopy Create free account
hub / github.com/daodst/chat / ECCEncrypt

Function ECCEncrypt

new_feature/key_func.go:53–56  ·  view source on GitHub ↗
(pt []byte, puk ecies.PublicKey)

Source from the content-addressed store, hash-verified

51 return ECCEncrypt(msg, *eciesPubKey)
52}
53func ECCEncrypt(pt []byte, puk ecies.PublicKey) ([]byte, error) {
54 ct, err := ecies.Encrypt(rand.Reader, &puk, pt, nil, nil)
55 return ct, err
56}
57
58// Decode addr
59func Decode(privateKey string, msg []byte) ([]byte, error) {

Callers 1

EncodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected