There are 2 programs, a C program and a Java program . I would like to add a security function ( a program or function that can called by the C program and the Java program) in these 2 programs so that the programs cannot run after an expired date.
My planning is that firstly I write a program that write the expired date (in encrypt form) into the registry in the user's windows. (Q1: What programming should I use? I plan to use VB. Is there any advantages and disadvantages? Q2: Which encrypt method is good for that VB or the programming language u suggest?)
Secondly, everytime the user run the C program and the Java program, the program will call a module (maybe a class written in C), that module will try to go to the registry and get the expired date ( in encrypt form) and return the expired date to the C or Java program. (Q3: Would you please tell me what programming tool should I use so that both the C program and the Java program can call it? Would you please give me a sample program or reference for using that programming language to get the data in the registry? Q4: Would you also tell me the sample code for calling from C and Java using that programming language ? Q5: Would you also tell me how to decrypt the data that is encrypted in Q2 using the programming language u suggest to me in Q3? )
Would you also give suggestions on my planning ? What can I improved ?