nrfxlib API 3.3.99
Loading...
Searching...
No Matches
ocrypto_hmac_sha512.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
28#ifndef OCRYPTO_HMAC_SHA512_H
29#define OCRYPTO_HMAC_SHA512_H
30
31#include <stddef.h>
32#include <stdint.h>
33
34#include "ocrypto_sha512.h"
35
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41
45#define ocrypto_hmac_sha512_BYTES (64)
46
47
49typedef struct {
50 ocrypto_sha512_ctx sha;
51 uint8_t k[128];
52} ocrypto_hmac_sha512_ctx;
74 ocrypto_hmac_sha512_ctx *ctx,
75 const uint8_t* key, size_t key_len);
76
92 ocrypto_hmac_sha512_ctx *ctx,
93 const uint8_t *in, size_t in_len);
94
112 ocrypto_hmac_sha512_ctx *ctx,
113 uint8_t r[ocrypto_hmac_sha512_BYTES]);
131 uint8_t r[ocrypto_hmac_sha512_BYTES],
132 const uint8_t* key, size_t key_len,
133 const uint8_t* in, size_t in_len);
134
147 uint8_t r[ocrypto_hmac_sha512_BYTES],
148 const uint8_t* key, size_t key_len,
149 const uint8_t* in, size_t in_len,
150 const uint8_t* aad, size_t aad_len);
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif
157
void ocrypto_hmac_sha512(uint8_t r[(64)], const uint8_t *key, size_t key_len, const uint8_t *in, size_t in_len)
void ocrypto_hmac_sha512_init(ocrypto_hmac_sha512_ctx *ctx, const uint8_t *key, size_t key_len)
void ocrypto_hmac_sha512_aad(uint8_t r[(64)], const uint8_t *key, size_t key_len, const uint8_t *in, size_t in_len, const uint8_t *aad, size_t aad_len)
#define ocrypto_hmac_sha512_BYTES
Definition ocrypto_hmac_sha512.h:45
void ocrypto_hmac_sha512_final(ocrypto_hmac_sha512_ctx *ctx, uint8_t r[(64)])
void ocrypto_hmac_sha512_update(ocrypto_hmac_sha512_ctx *ctx, const uint8_t *in, size_t in_len)
SHA512 algorithm, a member of the SHA2 family, with 512 bit outputs.