Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed
Fork of iothub_client_sample_amqp by
sha-private.h
00001 // Copyright (c) Microsoft. All rights reserved. 00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information. 00003 00004 /*************************** sha-private.h ***************************/ 00005 /********************** See RFC 4634 for details *********************/ 00006 #ifndef _SHA_PRIVATE__H 00007 #define _SHA_PRIVATE__H 00008 /* 00009 * These definitions are defined in FIPS-180-2, section 4.1. 00010 * Ch() and Maj() are defined identically in sections 4.1.1, 00011 * 4.1.2 and 4.1.3. 00012 * 00013 * The definitions used in FIPS-180-2 are as follows: 00014 */ 00015 00016 #ifndef USE_MODIFIED_MACROS 00017 #define SHA_Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) 00018 #define SHA_Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) 00019 00020 #else /* USE_MODIFIED_MACROS */ 00021 /* 00022 * The following definitions are equivalent and potentially faster. 00023 */ 00024 00025 #define SHA_Ch(x, y, z) (((x) & ((y) ^ (z))) ^ (z)) 00026 #define SHA_Maj(x, y, z) (((x) & ((y) | (z))) | ((y) & (z))) 00027 00028 #endif /* USE_MODIFIED_MACROS */ 00029 00030 #define SHA_Parity(x, y, z) ((x) ^ (y) ^ (z)) 00031 00032 #endif /* _SHA_PRIVATE__H */ 00033
Generated on Tue Jul 12 2022 12:43:22 by
