Commit Graph

4 Commits

Author SHA1 Message Date
Wyatt Hepler
c656af2f12 pw_kvs: Implement AlignedChecksum
- Provide AlignedChecksum class that uses AlignedWriter to ensure that
  checksum updates are aligned as required.
- Make Finish() non-virtual and call an optional Finalize() operation
  instead.

Change-Id: I5b16468b6a55c0c2c9f2c06e37988970af147a11
2020-02-13 10:43:23 -08:00
Alexei Frolov
5603462746 pw_kvs: Update checksum interface
This change adds a Finish() function to the checksum class to support
checksums which have a final transformation after all the input data is
processed, such as AES CMAC.

Change-Id: I86ab091c1719ab5333de59c170e58634b6e9d86f
2020-02-07 21:33:57 +00:00
Wyatt Hepler
6e3a83b61f pw_kvs: Get checksums working; enable test
- Allow checksums to verify data larger than their internal state. This
  facilitates using a CRC16 in a uint32_t.
- Move checksum functions to the EntryHeader class, since it ultimately
  stores the checksums and is included with it.
- Enable one checksum test. Further tests are needed.
- Make some tweaks to the Get overload for objects.

Change-Id: I989b72905e140794f75c8f8619aaab1623f6f195
2020-02-04 16:35:40 -08:00
Wyatt Hepler
ec4b9351de pw_kvs: Implement CRC16 checksum for KVS
- Create CRC16 implementation of pw::kvs::ChecksumAlgorithm.
- Add tests for the ChecksumAlgorithm class.

Change-Id: I3d7268e49c4eec06d61e113602ce24c05a3b0fa0
2020-02-04 01:22:49 +00:00