projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix streaming implementation, now it could be halt only calling the stop function.
[bertos.git]
/
bertos
/
sec
/
cipher
/
blowfish_test.c
diff --git
a/bertos/sec/cipher/blowfish_test.c
b/bertos/sec/cipher/blowfish_test.c
index 0a041e62a2c4916dba4c07097c4b4f3e98e10e14..ab60babc4774415513316b8d769c3f750dc88a24 100644
(file)
--- a/
bertos/sec/cipher/blowfish_test.c
+++ b/
bertos/sec/cipher/blowfish_test.c
@@
-26,7
+26,7
@@
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 20
06
Develer S.r.l. (http://www.develer.com/)
+ * Copyright 20
10
Develer S.r.l. (http://www.develer.com/)
*
* -->
*
*
* -->
*
@@
-36,7
+36,12
@@
*/
#include "blowfish.h"
*/
#include "blowfish.h"
+
+#include <cfg/debug.h>
+#include <cfg/test.h>
+
#include <cpu/byteorder.h>
#include <cpu/byteorder.h>
+#include <string.h>
/*
* Author : Randy L. Milbert
/*
* Author : Randy L. Milbert
@@
-166,9
+171,11
@@
int blowfish_testTearDown(void)
int blowfish_testRun(void)
{
int blowfish_testRun(void)
{
+ // NOTE: we use a static variable here to avoid stack overflows due to the huge
+ // context structure of blowfish.
static BlowfishContext ctx;
blowfish_init(&ctx);
static BlowfishContext ctx;
blowfish_init(&ctx);
- BlockCipher *c = &ctx.c;
//blowfish_stackinit();
+ BlockCipher *c = &ctx.c;
for (int i=0; i<NUM_VARIABLE_KEY_TESTS; ++i)
{
for (int i=0; i<NUM_VARIABLE_KEY_TESTS; ++i)
{