I have a Python program for some application. And I have a C program for encrypting a string. The python program generates a string and I want to use the C program to encrypt it. I read a lot about interfacing between C and Python and it does not seem to work. If anyone has any suggestions will be helpful.
#Python
a="abcdefg" #Need to encrypt this
encrypted_a=encrypt_func(a)#This function is implemented in C code
//C code
#include<gmp.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
char* encrypt_func(char* a)//I want to input the string a="abcdefg" from python here
{
char encrypted_string[20];
//do something
return encrypted_string;
}