Systemsicherheit/Assignment 7 - SGX Hands-on/sha256/sha256.h
Sascha Tommasone 9df8ca5810
All checks were successful
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Successful in 1m2s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Successful in 1m3s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Successful in 1m0s
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (pull_request) Successful in 30s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (pull_request) Successful in 8s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (pull_request) Successful in 8s
[Assignment-7] sha256 implementation
2024-06-29 12:00:22 +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