samedi 31 janvier 2015

Generate random value at compiler time and forever

So, i don't know if i was completely clear in my question but what I'm trying to do is a simple concept: i want to while compiling a c# windows forms application a variable X assume a value i wont know. But EVERY time i execute the application without compiling it again, this value is the same (but you don't know). So what I'm asking is if exist the possibility to compile something that you don't know which value will be. The application will use this same variable with the same value each time, but every time you compile the application again, this variable would change.


I'm trying to implement a security algorithm that will be different for each distribution of my application, but i want to do this in a automatic way without changing manual paramters for each release of my application.


A simple example of what i mean:



  • (while compiling) i = rand().

  • (when executed the app) i = ? (some value you will never know, but will be the same every time you execute the application)





Aucun commentaire:

Enregistrer un commentaire