I'm creating a flutter(mobile) application and for backend a django API(without REST framework). When a request is made from the application some work is done on the server(which uses high resources) and result is delivered to the mobile application.
To make it secure, I want to add some custom security method.
My flutter and django applications(both) have a key which is kept private and used for encrypting and decrypting text.
And my flutter application gets current time(in seconds [int]) and encrypt that with the private key and create a get/post request to the django application with the encrypted time, and in django application it gets decrypted and validated if it is correct timing, and return the results after work, else returns an error.
The problem I'm facing here is I can not find any similar way to encrypt and decrypt text in python and dart.