Systemsicherheit/Assignment 7 - SGX Hands-on/lib/sha256.h
2024-07-08 11:19:48 +02:00

25 lines
No EOL
393 B
C

#ifndef SHA256_H
#define SHA256_H
#include <stdint.h>
#include <stddef.h>
#define SIZE 32
#define BUFFSIZE 4096
typedef uint8_t u8;
typedef uint32_t u32;
typedef uint64_t u64;
typedef struct sha256State {
u32 W[64];
u32 message[16];
u32 H[8];
u32 message_length;
u64 length;
u8 finalised;
} sha256State_t;
void sha256(u8 *hash, u8 *buffer, size_t buffer_length);
#endif