Switch message cipher consumers to shared media API
This commit is contained in:
1 parent
9c22b04cb0
commit
b4ef4ec919
4 files changed
+25
-25
No files matched your search
+1
-1
@@ -262,7 +262,7 @@ static size_t test_body(struct UTUN_INSTANCE* author, uint64_t seq, const char*
|
||||
body[32] = 4;
|
||||
memcpy(body + 33, "text", 4);
|
||||
size_t enc_len = 0;
|
||||
if (dm_encrypt(key, nonce, (const uint8_t*)text, strlen(text), body + 39, &enc_len) != 0) return 0;
|
||||
if (media_ccm_encrypt(key, nonce, (const uint8_t*)text, strlen(text), body + 39, &enc_len) != 0) return 0;
|
||||
uint16_t n = (uint16_t)enc_len;
|
||||
memcpy(body + 37, &n, 2);
|
||||
if (sc_ed25519_sign(author->my_ed25519_privkey, body, 39 + enc_len, body + 39 + enc_len) != SC_OK) return 0;
|
||||
|
||||
Reference in new issue
Block a user