Commit Graph

4 Commits

Author SHA1 Message Date
Adam Babik 4492eb9779
Decode MembershipUpdate message (#76)
This change also adds CreatePrivateGroupTextMessage function to create a group message. Relates to #73
2019-09-23 10:52:59 +02:00
Andrea Maria Piana 28b2244fed
Handle messages in raw method as well 2019-07-29 16:19:04 +02:00
Andrea Maria Piana db4b2126d0 [Parts of #7] Wrap & signs messages if specified in config
Currently datasync propagates the unencrypted messages. This messages
might be relayed to a third party. We can't therefore rely on whisper
signature, as the author might not be the same as the relayer.

This commit wraps our current message in a protobuf record with an
optional signature.

If the signature is present it will be used to indicate the author of
the message, otherwise whisper is used.

It's not enabled by default as this is a breaking change and should go
live with v1. Decoding is backward compatible, so old messages will
still be read.

I have also changed the messageID scheme to use:
compressedBytesOfPk + Keccak256 of the encoded unencrypted payload, instead of the whisper ID.
2019-07-21 07:41:38 +02:00
Adam Babik 5c6039f77f
Refactor the library (#20) 2019-07-16 12:43:07 +02:00