From 67efedec54a665282400faed471a18adf62c17f7 Mon Sep 17 00:00:00 2001 From: a1ien Date: Mon, 7 Oct 2013 23:23:44 +0400 Subject: [PATCH] [STM32F2-F4:CRYPTO]Fix hash_set_last_word_valid_bits() --- lib/stm32/common/hash_common_f24.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stm32/common/hash_common_f24.c b/lib/stm32/common/hash_common_f24.c index dca44385..3207fe78 100644 --- a/lib/stm32/common/hash_common_f24.c +++ b/lib/stm32/common/hash_common_f24.c @@ -99,7 +99,7 @@ Specifies the number of valid bits in the last word. void hash_set_last_word_valid_bits(uint8_t validbits) { HASH_STR &= ~(HASH_STR_NBW); - HASH_STR |= 32 - validbits; + HASH_STR |= validbits; } /*---------------------------------------------------------------------------*/