a5458bb8d2
All checks were successful
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Successful in 1m1s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Successful in 1m2s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Successful in 1m0s
25 lines
No EOL
393 B
C
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 |