7 |
* Redistribution of this file is permitted under the GNU Public License. |
* Redistribution of this file is permitted under the GNU Public License. |
8 |
*/ |
*/ |
9 |
|
|
10 |
|
#ifdef HAVE_CONFIG_H |
11 |
|
#include <config.h> |
12 |
|
#endif |
13 |
|
|
14 |
|
#include <string.h> |
15 |
#include <string.h> |
#include <string.h> |
16 |
#include <sys/types.h> |
#include <sys/types.h> |
17 |
#include "md.h" |
#include "md.h" |
225 |
/* clear sensitive information */ |
/* clear sensitive information */ |
226 |
memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); |
memset(&ctx->sha_out[32], 0, sizeof(sha256_context) - 32); |
227 |
} |
} |
|
|
|
228 |
|
|
229 |
unsigned char * |
|
230 |
|
unsigned char * |
231 |
sha256_read (sha256_context * ctx) |
sha256_read (sha256_context * ctx) |
232 |
{ |
{ |
233 |
return ctx->sha_out; |
return ctx->sha_out; |
390 |
memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); |
memset(&ctx->sha_out[64], 0, sizeof(sha512_context) - 64); |
391 |
} |
} |
392 |
|
|
393 |
unsigned char * |
unsigned char * |
394 |
sha512_read (sha512_context * ctx) |
sha512_read (sha512_context * ctx) |
395 |
{ |
{ |
396 |
return ctx->sha_out; |
return ctx->sha_out; |