diff options
author | Nathan Lasseter <nathan.je.lasseter@googlemail.com> | 2013-04-28 12:40:39 +0100 |
---|---|---|
committer | Nathan Lasseter <nathan.je.lasseter@googlemail.com> | 2013-04-28 12:40:39 +0100 |
commit | ce19147e916925945d65823543997d397af40dcb (patch) | |
tree | 2d0b6055ce6a443d58256147236b18a4b762d721 /encrypt.c | |
parent | ae2890afb2bc80b986ccf4798490cd4b1208ccff (diff) |
Everchanging passphrase to avoid ECB attacksnonecb
Diffstat (limited to 'encrypt.c')
-rw-r--r-- | encrypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,6 @@ /* * SimpleCrypt + * Non-ECB version * So simple it's all one function. * * Nathan Lasseter (User_4574) @@ -45,7 +46,8 @@ int main(int argc, char** argv) { int c, d, j = 0; while ((c=fgetc(file)) != EOF) { - d = c ^ passphrase[j]; + d = c + passphrase[j]; + passphrase[j] = d; fputc(d, temp); if (j == passlen) j=0; |