nrfxlib API 2.8.99
Loading...
Searching...
No Matches
ocrypto_sha256.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 2024 Nordic Semiconductor ASA
3 * Copyright (c) since 2013 Oberon microsystems AG
4 *
5 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
6 */
7
8
23#ifndef OCRYPTO_SHA256_H
24#define OCRYPTO_SHA256_H
25
26#include <stddef.h>
27#include <stdint.h>
28
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34
38#define ocrypto_sha256_BYTES (32)
39
40
42typedef struct {
43 uint32_t h[8], v[8], w[16];
44 uint8_t buffer[64];
45 uint32_t length;
46 size_t in_length;
47} ocrypto_sha256_ctx;
65 ocrypto_sha256_ctx *ctx);
66
82 ocrypto_sha256_ctx *ctx,
83 const uint8_t *in, size_t in_len);
84
102 ocrypto_sha256_ctx *ctx,
103 uint8_t r[ocrypto_sha256_BYTES]);
116 uint8_t r[ocrypto_sha256_BYTES],
117 const uint8_t *in, size_t in_len);
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif
124
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:38
void ocrypto_sha256_update(ocrypto_sha256_ctx *ctx, const uint8_t *in, size_t in_len)
void ocrypto_sha256_init(ocrypto_sha256_ctx *ctx)