• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hiding class and method symbols in the compiled program?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding class and method symbols in the compiled program?


  • Subject: Re: Hiding class and method symbols in the compiled program?
  • From: Sylvain Leroux <email@hidden>
  • Date: Sat, 27 Jul 2002 18:04:40 +0200

Maybe some other member have a better idea.

However, I have a 'trick' that will work with every C dialect (including ANSI-C, C++, objective-C): all you have to do is to write a header containing defines for each symbol (i.e.: class, function, methods) you want to hide.

An exemple will be more clear:

/* HideTrick.h */
#if !defined HideTrick_h
#define HideTrick_h 1

#ifndef DEBUG
#define MYClass sym001
#define MYOtherClass sym002

#define MySecretFunction sym003

/* ... */
#endif

#endif

By including this header in all your files, the C preprocessor (cpp) will replace the descriptive symbols you want to hide by cryptic ones (notice the use of 'ifndef DEBUG', so the replacement will not occurs for development builds!-).



Le samedi 27 juillet 2002, ` 04:55 , Pierre-Olivier Latour a icrit :

Hi again,

To prevent my program from being too easily hacked, I'd like that class and
method names be not visible in the Mach-O binary.

I did a quick test by building a Foundation tool. I turned off debugging
symbols in the project options, and select the "deployment" target
variation.
Using "sample" in the terminal still shows the readable names of my class...

Is it possible to really hide these names? Say I have a class that handle
serial number verifications, it's going to be really easy to bypass if its
name is clearly visible.

Any idea?


_____________________________________________________________

Pierre-Olivier Latour email@hidden
Lausanne, Switzerland http://www.pol-online.net
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Hiding class and method symbols in the compiled program? (From: Pierre-Olivier Latour <email@hidden>)

  • Prev by Date: Re: determining dragging source
  • Next by Date: CGImage failing to animate
  • Previous by thread: Hiding class and method symbols in the compiled program?
  • Next by thread: Re: Hiding class and method symbols in the compiled program?
  • Index(es):
    • Date
    • Thread