A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
activate commute flag for MPI_Op, adds smpi_op_is_commute to test it (-1 FIXME !)
[simgrid.git]
/
src
/
xbt
/
xbt_sha.c
diff --git
a/src/xbt/xbt_sha.c
b/src/xbt/xbt_sha.c
index 7fe54419c0a84880f4a7e6236ee089f6b81e8b3e..de3522fa8a8e91be67011cf0f07dfa7dbb588023 100644
(file)
--- a/
src/xbt/xbt_sha.c
+++ b/
src/xbt/xbt_sha.c
@@
-150,8
+150,8
@@
static void sha_calculate(xbt_sha_t sha)
for (i = 16; i < 80; i++)
sha->buf[i] =
for (i = 16; i < 80; i++)
sha->buf[i] =
- SRL(sha->buf[i - 3] ^ sha->buf[i - 8] ^ sha->
- buf[i - 14] ^ sha->buf[i - 16], 1);
+
SRL(sha->buf[i - 3] ^ sha->buf[i - 8] ^ sha->
+
buf[i - 14] ^ sha->buf[i - 16], 1);
A = sha->hash[0];
B = sha->hash[1];
A = sha->hash[0];
B = sha->hash[1];
@@
-195,16
+195,13
@@
static void test_sha(const char *clear, const char *hashed)
char hash[41];
xbt_sha(clear, hash);
char hash[41];
xbt_sha(clear, hash);
- xbt_test_add
1
("==== Test with '%s'", clear);
- xbt_test_assert
3
(!memcmp(hash, hashed, 40), "Wrong sha: %40s!=%40s (%s)",
+ xbt_test_add("==== Test with '%s'", clear);
+ xbt_test_assert(!memcmp(hash, hashed, 40), "Wrong sha: %40s!=%40s (%s)",
hash, hashed, mycmp(hash, hashed, 40));
}
XBT_TEST_SUITE("hash", "Various hash functions");
hash, hashed, mycmp(hash, hashed, 40));
}
XBT_TEST_SUITE("hash", "Various hash functions");
-XBT_LOG_NEW_DEFAULT_CATEGORY(hash, "Tests of various hash functions ");
-
-
XBT_TEST_UNIT("sha", test_crypto_sha, "Test of the sha algorithm")
{
/* Empty string as test vector */
XBT_TEST_UNIT("sha", test_crypto_sha, "Test of the sha algorithm")
{
/* Empty string as test vector */
@@
-219,4
+216,4
@@
XBT_TEST_UNIT("sha", test_crypto_sha, "Test of the sha algorithm")
"373ba8be29d4d95708bf7cd43038f4e409dcb439");
}
"373ba8be29d4d95708bf7cd43038f4e409dcb439");
}
-#endif /* SIMGRID_TEST */
+#endif
/* SIMGRID_TEST */