RetroArch
sha256.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_SHA256_H
24 #define MBEDTLS_SHA256_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_SHA256_ALT)
36 // Regular implementation
37 //
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
46 typedef struct
47 {
48  uint32_t total[2];
50  unsigned char buffer[64];
51  int is224;
52 }
54 
61 
68 
76  const mbedtls_sha256_context *src );
77 
85 
93 void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *input,
94  size_t ilen );
95 
102 void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32] );
103 
104 /* Internal use */
105 void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] );
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #else /* MBEDTLS_SHA256_ALT */
112 #include "sha256_alt.h"
113 #endif /* MBEDTLS_SHA256_ALT */
114 
115 #ifdef __cplusplus
116 extern "C" {
117 #endif
118 
127 void mbedtls_sha256( const unsigned char *input, size_t ilen,
128  unsigned char output[32], int is224 );
129 
135 int mbedtls_sha256_self_test( int verbose );
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 #endif /* mbedtls_sha256.h */
void mbedtls_sha256_free(mbedtls_sha256_context *ctx)
Clear SHA-256 context.
Definition: sha256.c:83
void mbedtls_sha256_finish(mbedtls_sha256_context *ctx, unsigned char output[32])
SHA-256 final digest.
Definition: sha256.c:291
Configuration options (set of defines)
void mbedtls_sha256(const unsigned char *input, size_t ilen, unsigned char output[32], int is224)
Output = SHA-256( input buffer )
Definition: sha256.c:327
Definition: ibxm.h:9
GLenum GLenum GLenum input
Definition: glext.h:9938
int mbedtls_sha256_self_test(int verbose)
Checkup routine.
Definition: sha256.c:393
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
void mbedtls_sha256_starts(mbedtls_sha256_context *ctx, int is224)
SHA-256 context setup.
Definition: sha256.c:100
int is224
Definition: sha256.h:51
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
GLenum src
Definition: glext.h:6980
void mbedtls_sha256_init(mbedtls_sha256_context *ctx)
Initialize SHA-256 context.
Definition: sha256.c:78
std::string output
Definition: Config.FromFile.cpp:44
void mbedtls_sha256_clone(mbedtls_sha256_context *dst, const mbedtls_sha256_context *src)
Clone (the state of) a SHA-256 context.
Definition: sha256.c:91
void mbedtls_sha256_update(mbedtls_sha256_context *ctx, const unsigned char *input, size_t ilen)
SHA-256 process buffer.
Definition: sha256.c:242
GLenum GLenum dst
Definition: glext.h:6980
void mbedtls_sha256_process(mbedtls_sha256_context *ctx, const unsigned char data[64])
Definition: sha256.c:183
Definition: video4linux2.c:51
unsigned int uint32_t
Definition: stdint.h:126
SHA-256 context structure.
Definition: sha256.h:46