I don't quite get what you mean. If you really have the //comments, then you have this:
Code:
... misc code...
//perform encryption activity
... misc code...
//do normal operation
... misc code...
Then this should do what you want:
Code:
find /path/to/project -type f
-exec grep -Fxq '//perform encryption activity' '{}' \;
-exec grep -Fxq '//do normal operation' '{}' \;
-exec sed -i -e '/^\/\/perform encryption activity$/ i#ifdef _ENCRYPTION_' -e '/^\/\/do normal operation$/ i#endif' '{}' \;
This is a single command (one line), broken into several lines here for better readability.
This shell command finds files that contain both comments, and inserts the preprocessor commands above the comments.
I did not test, so try with a test folder first.
Yves.