nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_sha1.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_SHA1_H
31#define OCRYPTO_SHA1_H
32
33#include <stddef.h>
34#include <stdint.h>
35
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41
45#define ocrypto_sha1_BYTES (20)
46
47
49typedef struct {
50 uint32_t h[5];
51 uint8_t buffer[80 * 4];
52 uint32_t length;
53 size_t in_length;
54} ocrypto_sha1_ctx;
74 ocrypto_sha1_ctx *ctx);
75
91 ocrypto_sha1_ctx *ctx,
92 const uint8_t *in, size_t in_len);
93
111 ocrypto_sha1_ctx *ctx,
112 uint8_t r[ocrypto_sha1_BYTES]);
126 uint8_t r[ocrypto_sha1_BYTES],
127 const uint8_t *in, size_t in_len);
128
129#ifdef __cplusplus
130}
131#endif
132
133#endif
134
void ocrypto_sha1_final(ocrypto_sha1_ctx *ctx, uint8_t r[(20)])
void ocrypto_sha1_init(ocrypto_sha1_ctx *ctx)
#define ocrypto_sha1_BYTES
Definition ocrypto_sha1.h:45
void ocrypto_sha1_update(ocrypto_sha1_ctx *ctx, const uint8_t *in, size_t in_len)
void ocrypto_sha1(uint8_t r[(20)], const uint8_t *in, size_t in_len)