bugfix in peer decrypt

This commit is contained in:
ycc 2022-12-17 21:50:22 +01:00
parent 7d6d8dd913
commit b0cf89e428

View File

@ -165,7 +165,7 @@ func (p *Peer) AsymEncryptMessage(Message []byte) (EncryptedMessage []byte, Sign
// AsymDecryptMessage reads a message from a specific peer contact // AsymDecryptMessage reads a message from a specific peer contact
func (p *Peer) AsymDecryptMessage(Message []byte, Signature []byte) (DecryptedMessage []byte, err error) { func (p *Peer) AsymDecryptMessage(Message []byte, Signature []byte) (DecryptedMessage []byte, err error) {
DecryptedMessage, err = meowlib.AsymDecryptAndCheck(p.MyIdentity.Private, p.Contact.ContactPublicKey, Message, Signature) DecryptedMessage, err = meowlib.AsymDecryptAndCheck(p.MyEncryptionKp.Private, p.Contact.ContactPublicKey, Message, Signature)
if err != nil { if err != nil {
fmt.Println(err.Error()) fmt.Println(err.Error())
return nil, err return nil, err