diff options
| author | Benedict <benedict@0xb8000.de> | 2016-08-04 19:24:17 +0200 |
|---|---|---|
| committer | Benedict <benedict@0xb8000.de> | 2017-02-21 13:00:25 +0100 |
| commit | 4e0e29f48f797206a21aa5ba7855ffde72e85cf9 (patch) | |
| tree | 951795c82c357aa9560f7b529f5b93e51554ed86 /set1/task6.c | |
| parent | 11b2ff584c67cf85ebe2405f6a74ab2799736927 (diff) | |
completed set3, challenge 20
Diffstat (limited to 'set1/task6.c')
| -rw-r--r-- | set1/task6.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/set1/task6.c b/set1/task6.c index 10e19b2..a6a4bfb 100644 --- a/set1/task6.c +++ b/set1/task6.c @@ -1,33 +1,5 @@ #include "../lib/lib.h" -/** - * split ciphertext in blocks of size blocksize - * @return returns an array of string of size with blocksize elements - */ - - -char **transpose_blocks(char *ciphertext, int blocksize, int length) -{ - char **blocks; - int i, j; - int number_blocks = length / blocksize; - - blocks = malloc(blocksize*(sizeof(char*))); - - for(i=0;i<blocksize;i++) { - blocks[i] = malloc(number_blocks+1); - } - - for(j=0;j<blocksize;j++) { - for(i=0;i<number_blocks;i++) { - blocks[j][i] = ciphertext[(i*blocksize)+j]; - } - } - - return blocks; -} - - int main() { int keysize; |
