X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1a158b7a4db45818e8f62b7bdac7f0d1bf36d140..719a77db362a51309e90a75253788223936b276c:/src/xbt/xbt_sha.c diff --git a/src/xbt/xbt_sha.c b/src/xbt/xbt_sha.c index f74500a8da..6290cd908a 100644 --- a/src/xbt/xbt_sha.c +++ b/src/xbt/xbt_sha.c @@ -1,16 +1,17 @@ /* xbt_sha.c - SHA1 hash function */ +/* Copyright (c) 2008-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + /* Initial version part of iksemel (XML parser for Jabber) * Copyright (C) 2000-2003 Gurer Ozen . All right reserved. * Distributed under LGPL v2.1, February 1999. */ /* Later adapted to fit into SimGrid. Distributed under LGPL v2.1, Feb 1999.*/ -/* Copyright (c) 2008, 2009, 2010. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ #include "xbt/sysdep.h" #include "xbt/hash.h" @@ -99,7 +100,7 @@ static void xbt_sha_finalize(xbt_sha_t sha) /** @brief returns the sha hash into a newly allocated buffer (+ reset sha object) */ char *xbt_sha_read(xbt_sha_t sha) { - char *res = xbt_malloc(40); + char *res = xbt_malloc(41); xbt_sha_print(sha, res); return res; } @@ -202,9 +203,6 @@ static void test_sha(const char *clear, const char *hashed) 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 */