diff options
Diffstat (limited to 'test_crypto_buffer.c')
-rw-r--r-- | test_crypto_buffer.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test_crypto_buffer.c b/test_crypto_buffer.c index 25e6c93..aeae892 100644 --- a/test_crypto_buffer.c +++ b/test_crypto_buffer.c @@ -29,7 +29,7 @@ int main(void) close(fd); printf("file written\n"); memset(decrypted,0,64); - + /* read */ fd = open("./crypto_file",O_RDONLY); if(fd == -1) return -1; @@ -40,7 +40,7 @@ int main(void) close(fd); assert(memcmp(phrase,decrypted,5)==0); memset(decrypted,0,64); - + /* write */ fd = open("./crypto_file",O_WRONLY|O_CREAT|O_TRUNC,0644); if(fd == -1) return -1; @@ -100,7 +100,7 @@ int main(void) close(fd); assert(memcmp(phrase,decrypted,64)==0); memset(decrypted,0,64); - + /* write */ fd = open("./crypto_file",O_WRONLY|O_CREAT|O_TRUNC,0644); if(fd == -1) return -1; @@ -114,7 +114,7 @@ int main(void) close(fd); printf("file written\n"); memset(decrypted,0,64); - + /* read */ fd = open("./crypto_file",O_RDONLY); if(fd == -1) return -1; @@ -152,7 +152,7 @@ int main(void) close(fd); printf("file written\n"); memset(decrypted,0,64); - + /* read */ fd = open("./crypto_file",O_RDONLY); if(fd == -1) return -1; @@ -177,7 +177,7 @@ int main(void) close(fd); assert(memcmp(phrase,decrypted,64)==0); memset(decrypted,0,64); - + /* write */ fd = open("./crypto_file",O_WRONLY|O_CREAT|O_TRUNC,0644); if(fd == -1) return -1; @@ -191,7 +191,7 @@ int main(void) close(fd); printf("file written\n"); memset(decrypted,0,64); - + /* read */ fd = open("./crypto_file",O_RDONLY); if(fd == -1) return -1; @@ -202,7 +202,7 @@ int main(void) close(fd); assert(memcmp(phrase,decrypted,64)==0); memset(decrypted,0,64); - + /* read */ fd = open("./crypto_file",O_RDONLY); if(fd == -1) return -1; |