mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-06-07 06:42:00 +00:00
SMP v3: encrypt message timestamp and flags together with the body between server and recipient (#457)
* SMP v3: encrypt message timestamp and flags together with the body between server and recipient * v3 tests * update protocol doc * add test for max size message * delay in notifications test * simplify v3 * encrypt server message to the recipient when sent * refactor * exit on error restoring the messages * refactor, increase test timeout * style * add prints to the test * remove error from unsafeMaxLenBS * update protocol * lint, improve test, change func param
This commit is contained in:
committed by
GitHub
parent
e3d2d6fc91
commit
9c1b43791c
@@ -197,3 +197,9 @@ instance (Encoding a, Encoding b, Encoding c, Encoding d, Encoding e, Encoding f
|
||||
{-# INLINE smpEncode #-}
|
||||
smpP = (,,,,,,) <$> smpP <*> smpP <*> smpP <*> smpP <*> smpP <*> smpP <*> smpP
|
||||
{-# INLINE smpP #-}
|
||||
|
||||
instance (Encoding a, Encoding b, Encoding c, Encoding d, Encoding e, Encoding f, Encoding g, Encoding h) => Encoding (a, b, c, d, e, f, g, h) where
|
||||
smpEncode (a, b, c, d, e, f, g, h) = smpEncode a <> smpEncode b <> smpEncode c <> smpEncode d <> smpEncode e <> smpEncode f <> smpEncode g <> smpEncode h
|
||||
{-# INLINE smpEncode #-}
|
||||
smpP = (,,,,,,,) <$> smpP <*> smpP <*> smpP <*> smpP <*> smpP <*> smpP <*> smpP <*> smpP
|
||||
{-# INLINE smpP #-}
|
||||
|
||||
Reference in New Issue
Block a user