Created
October 21, 2016 09:57
-
-
Save msm-code/ebe0943b9427d38900be0a14c4d65e23 to your computer and use it in GitHub Desktop.
paper.cpp.9fe969957d8333124adfd59d98c59b29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void encrypted_memcpy(char *to, char *from, int len) { | |
| if (is_in_encrypted_section(to)) { | |
| if (is_in_encrypted_section(from)) { | |
| memcpy(to, from, len); | |
| } else { | |
| memcpy_and_encrypt(to, from, len); | |
| } | |
| } else { | |
| if (is_in_encrypted_section(from)) { | |
| memcpy_and_decrypt(to, from, len); | |
| } else { | |
| memcpy(to, from, len); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment