Age | Commit message (Collapse) | Author |
|
Bug: 456
Change-Id: I194fc402379582c13e05cdcfdbd3d3a4330fe37c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/66749
Commit-Queue: Yecheng Zhao <zyecheng@google.com>
Reviewed-by: Ali Zhang <alizhang@google.com>
|
|
Updates logging to be consistent with the following principles.
1. Library modules should favor PW_LOG_DEBUG() over PW_LOG_ERROR() as
whether something is considered and "error" should a discretion
of the caller, not the callee. PW_LOG_ERROR() also bloats code
size. Libraries should try to communicate the result of an operation
via status codes.
2. Use PW_LOG_DEBUG() liberally in library modules to help development
and debugging, but use a local conditional to compile them out by
default. In this change, this is achieved by setting the default
debug level to PW_LOG_LEVEL_WARN for each file.
No-Docs-Update-Reason: refactor only.
Change-Id: I032c7a86ae6aaee5c6ec0c28cef5662a36bb9358
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/56360
Commit-Queue: Ali Zhang <alizhang@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
|
|
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>
|
|
Change-Id: I33b36bbc8a293379c1d9f6da7dfe80f12fc3f91e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53880
Reviewed-by: Darren Krahn <dkrahn@google.com>
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
|
|
Renames the function name sha256::Digest() to sha256::Hash() since
"digest" is more commonly used to denote the output of hashing.
Change-Id: I1463b61504757c744d4610ba453098579066de4d
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53780
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
Reviewed-by: Darren Krahn <dkrahn@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
|
|
Use the mbedtls_sha256_* APIs instead of the more general mbedtls_md_*
for an immediate reduction in code size -- 19KiB --> 2.8KiB. This avoids
the need to configure Mbed TLS to remove unused hashing algorithms
supported by mbedtls_md_*.
No-Docs-Update-Reason: no behavioral changes.
Change-Id: I7d450e6cb102aa395daabc20a98d1f0ca56360c0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/53540
Reviewed-by: Darren Krahn <dkrahn@google.com>
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com>
|
|
Change-Id: Iafe8e0a7159baddf6949d0c0c92dbb55019a792e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/52300
Commit-Queue: Ali Zhang <alizhang@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Darren Krahn <dkrahn@google.com>
|
|
Change-Id: I9ae84c9b3fff41129d1f6f17c2ee92d95078fa30
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/51061
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
|
|
No-Docs-Update-Reason: Docs already added in http://pwrev/c/50320
Change-Id: I18230b73e9fff360d3b879e5b9d743f8a7a2dc94
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/50600
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Ali Zhang <alizhang@google.com>
|