sha512.h
Go to the documentation of this file.
#ifndef MBEDTLS_SHA512_H
#define MBEDTLS_SHA512_H
#if !defined(MBEDTLS_CONFIG_FILE)
#include "config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include <stddef.h>
#include <stdint.h>
#if !defined(MBEDTLS_SHA512_ALT)
// Regular implementation
//
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
uint64_t total[2];
uint64_t state[8];
unsigned char buffer[128];
int is384;
}
mbedtls_sha512_context;
void mbedtls_sha512_init( mbedtls_sha512_context *ctx );
void mbedtls_sha512_free( mbedtls_sha512_context *ctx );
void mbedtls_sha512_clone( mbedtls_sha512_context *dst,
const mbedtls_sha512_context *src );
void mbedtls_sha512_starts( mbedtls_sha512_context *ctx, int is384 );
void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *input,
size_t ilen );
void mbedtls_sha512_finish( mbedtls_sha512_context *ctx, unsigned char output[64] );
#ifdef __cplusplus
}
#endif
#else /* MBEDTLS_SHA512_ALT */
#include "sha512_alt.h"
#endif /* MBEDTLS_SHA512_ALT */
#ifdef __cplusplus
extern "C" {
#endif
void mbedtls_sha512( const unsigned char *input, size_t ilen,
unsigned char output[64], int is384 );
int mbedtls_sha512_self_test( int verbose );
/* Internal use */
void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char data[128] );
#ifdef __cplusplus
}
#endif
#endif /* mbedtls_sha512.h */
config.h
Configuration options (set of defines)
mbedtls_sha512_self_test
int mbedtls_sha512_self_test(int verbose)
Checkup routine.
mbedtls_sha512
void mbedtls_sha512(const unsigned char *input, size_t ilen, unsigned char output[64], int is384)
Output = SHA-512( input buffer )
mbedtls_sha512_process
void mbedtls_sha512_process(mbedtls_sha512_context *ctx, const unsigned char data[128])