View previous topic :: View next topic |
Author |
Message |
pilar
Joined: 30 Jan 2008 Posts: 197
|
Digital Signature |
Posted: Mon Sep 14, 2009 8:43 am |
|
|
Hi, I want to know if I can put a digital signature into the program memory of a pic, the signature would contain the author name of program or other data, this is possible? |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 14, 2009 11:50 am |
|
|
YES you can
the question becomes do you want to be able to REPORT that to the outside world , in the event you are protecting your code ?
a common way to do this is include a documented (or not) command in the program that executes:
printf(" (c)Joe C. Blow 2009 etc etc"); |
|
|
Guest
|
|
Posted: Mon Sep 14, 2009 12:02 pm |
|
|
Hi asmboy, in this case my code will not be protected, I just want to place the author's |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 14, 2009 12:27 pm |
|
|
if not protected and not printed - and not otherwise referred to
the compiler might choose in some versions to omit it
so located early in your MAIN or other function
Code: |
int i;
rom char myid[9] = "Joe.Blow"; // one extra char req for \0
i=*myid;
|
this approach insures that it will exist in ROM and is typically to be found near or at the end of the code space
NOTE: this example is for 18f6722
you should check the LST * hex file for YOUR compiler version and selected pic to make sure it is doing what you want |
|
|
Guest
|
|
Posted: Mon Sep 14, 2009 2:24 pm |
|
|
Thank you.. |
|
|
|