remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -2,22 +2,22 @@
|
||||
* Copyright (c) 2008 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
*
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
@@ -67,7 +67,7 @@ main(int argc, char **argv)
|
||||
FILE *in, *out;
|
||||
void *ibuf, *obuf;
|
||||
int ilen, olen;
|
||||
size_t block_size;
|
||||
size_t block_size;
|
||||
const EVP_CIPHER *c = EVP_aes_128_cbc();
|
||||
EVP_CIPHER_CTX ctx;
|
||||
int ret;
|
||||
@@ -97,14 +97,14 @@ main(int argc, char **argv)
|
||||
out = fopen(ofn, "w+");
|
||||
if (out == NULL)
|
||||
errx(1, "failed to open output file");
|
||||
|
||||
|
||||
/* Check that key and ivec are long enough */
|
||||
assert(EVP_CIPHER_key_length(c) <= sizeof(key));
|
||||
assert(EVP_CIPHER_iv_length(c) <= sizeof(ivec));
|
||||
|
||||
/*
|
||||
/*
|
||||
* Allocate buffer, the output buffer is at least
|
||||
* EVP_CIPHER_block_size() longer
|
||||
* EVP_CIPHER_block_size() longer
|
||||
*/
|
||||
ibuf = malloc(block_size);
|
||||
obuf = malloc(block_size + EVP_CIPHER_block_size(c));
|
||||
@@ -139,6 +139,6 @@ main(int argc, char **argv)
|
||||
/* write the last bytes out and close */
|
||||
fwrite(obuf, 1, olen, out);
|
||||
fclose(out);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user