MySensors Library & Examples
2.3.2
hal
crypto
AVR
drivers
HMAC_SHA256
hmac_sha256.h
1
/*
2
* The MySensors Arduino library handles the wireless radio link and protocol
3
* between your home built sensors/actuators and HA controller of choice.
4
* The sensors forms a self healing radio network with optional repeaters. Each
5
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
6
* network topology allowing messages to be routed to nodes.
7
*
8
* Created by Henrik Ekblad <
[email protected]
>
9
* Copyright (C) 2013-2019 Sensnology AB
10
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11
*
12
* Documentation: http://www.mysensors.org
13
* Support Forum: http://forum.mysensors.org
14
*
15
* This program is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU General Public License
17
* version 2 as published by the Free Software Foundation.
18
*
19
* ======================================================================
20
*
21
* HMAC SHA256 implementation for AVR:
22
*
23
* This file is part of the AVR-Crypto-Lib.
24
* Copyright (C) 2006-2015 Daniel Otte (
[email protected]
)
25
*
26
* This program is free software: you can redistribute it and/or modify
27
* it under the terms of the GNU General Public License as published by
28
* the Free Software Foundation, either version 3 of the License, or
29
* (at your option) any later version.
30
*
31
* This program is distributed in the hope that it will be useful,
32
* but WITHOUT ANY WARRANTY; without even the implied warranty of
33
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34
* GNU General Public License for more details.
35
*
36
* You should have received a copy of the GNU General Public License
37
* along with this program. If not, see <http://www.gnu.org/licenses/>.
38
*
39
* Author: Daniel Otte
40
*
41
* License: GPLv3 or later
42
*
43
* ======================================================================
44
*/
45
46
47
#ifndef _HMAC_SHA256_
48
#define _HMAC_SHA256_
49
50
#define IPAD 0x36
51
#define OPAD 0x5C
52
53
#define HMAC_SHA256_BITS SHA256_HASH_BITS
54
#define HMAC_SHA256_BYTES SHA256_HASH_BYTES
55
#define HMAC_SHA256_BLOCK_BITS SHA256_BLOCK_BITS
56
#define HMAC_SHA256_BLOCK_BYTES SHA256_BLOCK_BYTES
57
58
61
typedef
struct
{
62
sha256_ctx_t
a
;
63
sha256_ctx_t
b
;
64
}
hmac_sha256_ctx_t
;
65
75
void
hmac_sha256(
void
*dest,
const
void
*key, uint16_t keylength_b,
const
void
*msg,
76
uint32_t msglength_b);
77
78
#endif
hmac_sha256_ctx_t::a
sha256_ctx_t a
a
Definition:
hmac_sha256.h:62
hmac_sha256_ctx_t::b
sha256_ctx_t b
b
Definition:
hmac_sha256.h:63
hmac_sha256_ctx_t
hash context structure
Definition:
hmac_sha256.h:61
sha256_ctx_t
SHA-256 context type.
Definition:
sha256.h:64
Copyright (C) 2013-2019 Sensnology AB. Generated by
doxygen
1.8.17