nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_sha256.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2025 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
8
30#ifndef OCRYPTO_SHA256_H
31#define OCRYPTO_SHA256_H
32
33#include <stddef.h>
34#include <stdint.h>
35
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41
45#define ocrypto_sha256_BYTES (32)
46
47
49typedef struct {
50 uint32_t h[8], v[8], w[16];
51 uint8_t buffer[64];
52 uint32_t length;
53 size_t in_length;
54} ocrypto_sha256_ctx;
74 ocrypto_sha256_ctx *ctx);
75
91 ocrypto_sha256_ctx *ctx,
92 const uint8_t *in, size_t in_len);
93
111 ocrypto_sha256_ctx *ctx,
112 uint8_t r[ocrypto_sha256_BYTES]);
125 uint8_t r[ocrypto_sha256_BYTES],
126 const uint8_t *in, size_t in_len);
127
128#ifdef __cplusplus
129}
130#endif
131
132#endif
133
void ocrypto_sha256_final(ocrypto_sha256_ctx *ctx, uint8_t r[(32)])
void ocrypto_sha256(uint8_t r[(32)], const uint8_t *in, size_t in_len)
#define ocrypto_sha256_BYTES
Definition ocrypto_sha256.h:45
void ocrypto_sha256_update(ocrypto_sha256_ctx *ctx, const uint8_t *in, size_t in_len)
void ocrypto_sha256_init(ocrypto_sha256_ctx *ctx)