nrfxlib API 0.1.0
Loading...
Searching...
No Matches
ocrypto_sha1.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
29#ifndef OCRYPTO_SHA1_H
30#define OCRYPTO_SHA1_H
31
32#include <stddef.h>
33#include <stdint.h>
34
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40
44#define ocrypto_sha1_BYTES (20)
45
46
48typedef struct {
49 uint32_t h[5];
50 uint8_t buffer[80 * 4];
51 uint32_t length;
52 size_t in_length;
53} ocrypto_sha1_ctx;
71 ocrypto_sha1_ctx *ctx);
72
88 ocrypto_sha1_ctx *ctx,
89 const uint8_t *in, size_t in_len);
90
108 ocrypto_sha1_ctx *ctx,
109 uint8_t r[ocrypto_sha1_BYTES]);
123 uint8_t r[ocrypto_sha1_BYTES],
124 const uint8_t *in, size_t in_len);
125
126#ifdef __cplusplus
127}
128#endif
129
130#endif
131
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:44
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)