How To add encryption and decryption in mavlink_helpers.h file ? for securing mavlink protocol

To implement encryption to secure the MAVLink protocol, the files mavlink helpers.h
and mavlink types.h found in “ArduPlane-2.76→libraries→GCS MAVLink→ include→
mavlink→v1.0” will need to be modified in Notepad++ to include the encryption and
decryption functions

I’m trying to add AES encryption in mavlink.
I think the files are mavlink helpers.h and mavlink types.h found in ardupilot/build/sitl/libraries/GCS_MAVLink/include/mavlink/v2.0.
I succeeded to print plaintext packet and encrypted packet but the problem that the cyphertext length is not equal to the originaltext length, so when changing this in mavlink helpers.h and running ardupilot, the console generate uncomprehensible messages.

Hello Mr.Azza_Chlif and Mr.gopalakrishnan, from the title above, it really interesting about added encryption in MAVlink, can you share about this method, I really hope that this will be sharing from step by step, thank you for cooperation and sharing the knowledge.