Select one of the symbols to view example projects that use it.
 
Outline
#include "hardware/sha256.h"
sha256_get_result(sha256_result_t *, enum sha256_endianness)
Files
loading...
SourceVuRaspberry Pi Pico SDK and ExamplesPicoSDKsrc/rp2_common/hardware_sha256/sha256.c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/** * Copyright (c) 2024 Raspberry Pi (Trading) Ltd. * * SPDX-License-Identifier: BSD-3-Clause *//* ... */ #include "hardware/sha256.h" void sha256_get_result(sha256_result_t *out, enum sha256_endianness endianness) { for (uint i = 0; i < count_of(out->words); i++) { uint32_t data = sha256_hw->sum[i]; if (endianness == SHA256_BIG_ENDIAN) data = __builtin_bswap32(data); out->words[i] = data; }for (uint i = 0; i < count_of(out->words); i++) { ... } }{ ... }
Details
Show:
from
Types: Columns: