RetroArch
sha512.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_SHA512_H
24 #define MBEDTLS_SHA512_H
25 
26 #if !defined(MBEDTLS_CONFIG_FILE)
27 #include "config.h"
28 #else
29 #include MBEDTLS_CONFIG_FILE
30 #endif
31 
32 #include <stddef.h>
33 #include <stdint.h>
34 
35 #if !defined(MBEDTLS_SHA512_ALT)
36 /* Regular implementation */
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
45 typedef struct
46 {
47  uint64_t total[2];
49  unsigned char buffer[128];
50  int is384;
51 }
53 
60 
67 
75  const mbedtls_sha512_context *src );
76 
84 
92 void mbedtls_sha512_update( mbedtls_sha512_context *ctx, const unsigned char *input,
93  size_t ilen );
94 
101 void mbedtls_sha512_finish( mbedtls_sha512_context *ctx, unsigned char output[64] );
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #else /* MBEDTLS_SHA512_ALT */
108 #include "sha512_alt.h"
109 #endif /* MBEDTLS_SHA512_ALT */
110 
111 #ifdef __cplusplus
112 extern "C" {
113 #endif
114 
123 void mbedtls_sha512( const unsigned char *input, size_t ilen,
124  unsigned char output[64], int is384 );
125 
131 int mbedtls_sha512_self_test( int verbose );
132 
133 /* Internal use */
134 void mbedtls_sha512_process( mbedtls_sha512_context *ctx, const unsigned char data[128] );
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 #endif /* mbedtls_sha512.h */
Configuration options (set of defines)
void mbedtls_sha512_init(mbedtls_sha512_context *ctx)
Initialize SHA-512 context.
Definition: sha512.c:92
void mbedtls_sha512_starts(mbedtls_sha512_context *ctx, int is384)
SHA-512 context setup.
Definition: sha512.c:114
Definition: ibxm.h:9
GLenum GLenum GLenum input
Definition: glext.h:9938
void mbedtls_sha512_process(mbedtls_sha512_context *ctx, const unsigned char data[128])
Definition: sha512.c:196
void mbedtls_sha512_update(mbedtls_sha512_context *ctx, const unsigned char *input, size_t ilen)
SHA-512 process buffer.
Definition: sha512.c:272
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
GLenum src
Definition: glext.h:6980
int is384
Definition: sha512.h:50
SHA-512 context structure.
Definition: sha512.h:45
std::string output
Definition: Config.FromFile.cpp:44
int mbedtls_sha512_self_test(int verbose)
Checkup routine.
Definition: sha512.c:448
void mbedtls_sha512(const unsigned char *input, size_t ilen, unsigned char output[64], int is384)
Output = SHA-512( input buffer )
Definition: sha512.c:362
void mbedtls_sha512_finish(mbedtls_sha512_context *ctx, unsigned char output[64])
SHA-512 final digest.
Definition: sha512.c:324
GLenum GLenum dst
Definition: glext.h:6980
Definition: video4linux2.c:51
unsigned __int64 uint64_t
Definition: stdint.h:136
void mbedtls_sha512_free(mbedtls_sha512_context *ctx)
Clear SHA-512 context.
Definition: sha512.c:97
void mbedtls_sha512_clone(mbedtls_sha512_context *dst, const mbedtls_sha512_context *src)
Clone (the state of) a SHA-512 context.
Definition: sha512.c:105