@@ -27,27 +27,27 @@ namespace arduino { namespace sha256 {
27
27
::acu_sha256 (input, ilen, output);
28
28
}
29
29
30
- class SHA256 {
31
- public:
30
+ }} // arduino::sha256
32
31
33
- static constexpr uint32_t HASH_SIZE = SHA256_DIGEST_SIZE;
32
+ class SHA256 {
33
+ public:
34
34
35
- inline void begin () {
36
- return arduino::sha256::begin (&_ctx);
37
- }
38
- inline void update (uint8_t const * data, uint32_t const len) {
39
- return arduino::sha256::update (&_ctx, data, len);
40
- }
41
- inline void finalize (uint8_t * hash) {
42
- return arduino::sha256::finalize (&_ctx, hash);
43
- }
44
- static inline void sha256 (uint8_t const * data, uint32_t const len, uint8_t * hash) {
45
- return arduino::sha256::sha256 (data, len, hash);
46
- }
35
+ static constexpr uint32_t HASH_SIZE = SHA256_DIGEST_SIZE;
47
36
48
- private:
37
+ inline void begin () {
38
+ return arduino::sha256::begin (&_ctx);
39
+ }
40
+ inline void update (uint8_t const * data, uint32_t const len) {
41
+ return arduino::sha256::update (&_ctx, data, len);
42
+ }
43
+ inline void finalize (uint8_t * hash) {
44
+ return arduino::sha256::finalize (&_ctx, hash);
45
+ }
46
+ static inline void sha256 (uint8_t const * data, uint32_t const len, uint8_t * hash) {
47
+ return arduino::sha256::sha256 (data, len, hash);
48
+ }
49
49
50
- acu_sha256_ctx _ctx;
51
- };
50
+ private:
52
51
53
- }} // arduino::sha256
52
+ acu_sha256_ctx _ctx;
53
+ };
0 commit comments