summaryrefslogtreecommitdiff
path: root/C/HF/chap4/cryptic/encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'C/HF/chap4/cryptic/encrypt.c')
-rw-r--r--C/HF/chap4/cryptic/encrypt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/C/HF/chap4/cryptic/encrypt.c b/C/HF/chap4/cryptic/encrypt.c
new file mode 100644
index 0000000..128b1a4
--- /dev/null
+++ b/C/HF/chap4/cryptic/encrypt.c
@@ -0,0 +1,9 @@
+#include "encrypt.h"
+
+void encrypt(char *message)
+{
+ while (*message) {
+ *message = *message ^ 42;
+ message++;
+ }
+}