#include <string.h>
#include <inttypes.h>
Go to the source code of this file.
|
void | sha512_init (sha512_context *ctx) |
| Initialize SHA-512 context. More...
|
|
void | sha512_free (sha512_context *ctx) |
| Clear SHA-512 context. More...
|
|
void | sha512_starts (sha512_context *ctx, int is384) |
| SHA-512 context setup. More...
|
|
void | sha512_update (sha512_context *ctx, const unsigned char *input, size_t ilen) |
| SHA-512 process buffer. More...
|
|
void | sha512_finish (sha512_context *ctx, unsigned char output[64]) |
| SHA-512 final digest. More...
|
|
void | sha512 (const unsigned char *input, size_t ilen, unsigned char output[64], int is384) |
| Output = SHA-512( input buffer ) More...
|
|
int | sha512_file (const char *path, unsigned char output[64], int is384) |
| Output = SHA-512( file contents ) More...
|
|
void | sha512_process (sha512_context *ctx, const unsigned char data[128]) |
|
#define POLARSSL_ERR_SHA512_FILE_IO_ERROR -0x007A |
Read/write error in file.
Definition at line 38 of file sha512.h.
void sha512 |
( |
const unsigned char * |
input, |
|
|
size_t |
ilen, |
|
|
unsigned char |
output[64], |
|
|
int |
is384 |
|
) |
| |
Output = SHA-512( input buffer )
- Parameters
-
input | buffer holding the data |
ilen | length of the input data |
output | SHA-384/512 checksum result |
is384 | 0 = use SHA512, 1 = use SHA384 |
Definition at line 336 of file sha512.c.
int sha512_file |
( |
const char * |
path, |
|
|
unsigned char |
output[64], |
|
|
int |
is384 |
|
) |
| |
Output = SHA-512( file contents )
- Parameters
-
path | input file name |
output | SHA-384/512 checksum result |
is384 | 0 = use SHA512, 1 = use SHA384 |
- Returns
- 0 if successful, or POLARSSL_ERR_SHA512_FILE_IO_ERROR
SHA-512 final digest.
- Parameters
-
ctx | SHA-512 context |
output | SHA-384/512 checksum result |
Definition at line 298 of file sha512.c.
Clear SHA-512 context.
- Parameters
-
ctx | SHA-512 context to be cleared |
Definition at line 130 of file sha512.c.
Initialize SHA-512 context.
- Parameters
-
ctx | SHA-512 context to be initialized |
Definition at line 125 of file sha512.c.
void sha512_process |
( |
sha512_context * |
ctx, |
|
|
const unsigned char |
data[128] |
|
) |
| |
SHA-512 context setup.
- Parameters
-
ctx | context to be initialized |
is384 | 0 = use SHA512, 1 = use SHA384 |
Definition at line 141 of file sha512.c.
void sha512_update |
( |
sha512_context * |
ctx, |
|
|
const unsigned char * |
input, |
|
|
size_t |
ilen |
|
) |
| |
SHA-512 process buffer.
- Parameters
-
ctx | SHA-512 context |
input | buffer holding the data |
ilen | length of the input data |
Definition at line 246 of file sha512.c.