commit | 6ae057c48564ac41c288c3f211bbe5863f68ed5b | [log] [tgz] |
---|---|---|
author | Ali Zhang <alizhang@google.com> | Fri Jul 30 14:17:55 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Aug 24 07:17:19 2021 +0000 |
tree | 3f25d81656566ca61526bafcef8ba36f1cd72e9e | |
parent | 1829982bd541d899d43cacd23e4a1e2621ce707d [diff] |
pw_crypto: Refactor Sha256 1. Extracts state tracking from backends to the facade, with tests against a mocked backend. 2. Makes Sha256::Update() chainable. e.g. ``` if (!Sha256().Update(message).Update(more_message).Final().ok()) { // Handle errors. } ``` All usage and documentation are updated accordingly. 3. Inlines Sha256::Sha256()/Update()/Final() in sha256.h, removes sha256.cc. 4. Other trivial clean ups. Test: - `pw presubmit` - `pw presubmit --step gn_crypto_(mbedtls|boringssl|micro_ecc)_build` Change-Id: I1c9e09c4640472ff2bbff8853e076bd2ed9188d3 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55343 Commit-Queue: Ali Zhang <alizhang@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com> Reviewed-by: Keir Mierle <keir@google.com>
See our website: http://pigweed.dev