fio: fix aio trim completion latencies
[fio.git] / crc / sha256.h
index a3ca0e672e2da455b91801f13e908a1f18d9643a..b904c7d1d3d031660542565910f024f261fe5f1b 100644 (file)
@@ -1,13 +1,19 @@
 #ifndef FIO_SHA256_H
 #define FIO_SHA256_H
 
-struct sha256_ctx {
-       uint32_t count[2];
-       uint32_t state[8];
+#include <inttypes.h>
+
+#define SHA256_DIGEST_SIZE     32
+#define SHA256_BLOCK_SIZE      64
+
+struct fio_sha256_ctx {
+       uint32_t count;
+       uint32_t state[SHA256_DIGEST_SIZE / 4];
        uint8_t *buf;
 };
 
-void sha256_init(struct sha256_ctx *);
-void sha256_update(struct sha256_ctx *, const uint8_t *, unsigned int);
+void fio_sha256_init(struct fio_sha256_ctx *);
+void fio_sha256_update(struct fio_sha256_ctx *, const uint8_t *, unsigned int);
+void fio_sha256_final(struct fio_sha256_ctx *);
 
 #endif