ndn_gen_encrypted_payload used_size differs from ndn_probe_encrypted_payload_length
Opened this issue · 1 comments
yoursunny commented
In ndn_gen_encrypted_payload
, the used_size
output parameter is calculated as:
ndn-lite/encode/encrypted-payload.c
Lines 38 to 42 in d60a114
However, ndn_probe_encrypted_payload_length
calculates its result differently:
ndn-lite/encode/encrypted-payload.c
Lines 28 to 30 in d60a114
They differ in + NDN_AES_BLOCK_SIZE
on the last line.
Please explain why there's this difference.
tianyuan129 commented
I don't know the detail of this piece @Zhiyi-Zhang . But I suppose ndn_gen_encrypted_payload
doesn't calculate used_size
correctly.