summaryrefslogtreecommitdiff
path: root/src/fundamental/sha256.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fundamental/sha256.h')
-rw-r--r--src/fundamental/sha256.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fundamental/sha256.h b/src/fundamental/sha256.h
index 337e746c49..31790c2ebd 100644
--- a/src/fundamental/sha256.h
+++ b/src/fundamental/sha256.h
@@ -27,3 +27,7 @@ struct sha256_ctx {
void sha256_init_ctx(struct sha256_ctx *ctx);
uint8_t *sha256_finish_ctx(struct sha256_ctx *ctx, uint8_t resbuf[static SHA256_DIGEST_SIZE]);
void sha256_process_bytes(const void *buffer, size_t len, struct sha256_ctx *ctx);
+
+uint8_t* sha256_direct(const void *buffer, size_t sz, uint8_t result[static SHA256_DIGEST_SIZE]);
+
+#define SHA256_DIRECT(buffer, sz) sha256_direct(buffer, sz, (uint8_t[SHA256_DIGEST_SIZE]) {})