summaryrefslogtreecommitdiff
path: root/include/base32.h
Commit message (Collapse)AuthorAgeFilesLines
* common: Substitute modified CRC8 with CRC-5-USBSam Hurst2017-09-121-2/+3
| | | | | | | | | | | | | | | | | | | | The modified CRC8 implementation didn't detect some errors. For example, using the modified CRC8: CC5QQLALU and DC5QQLALU calculates to the same value. BUG=b:37952913 BRANCH=none TEST=make buildall Used online CRC-5-USB calculator to test several values against this implementation. Signed-off-by: Sam Hurst <shurst@chromium.org> Change-Id: I5a17941e25691872a25b41525f65f36e2ed1d4fa Reviewed-on: https://chromium-review.googlesource.com/660812 Commit-Ready: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Michael Tang <ntang@chromium.org>
* common: Add base32 encodingRandall Spangler2017-06-281-0/+72
Base32 encoding is used to turn the RMA reset binary challenge/response into less-typo-prone text, at 5 bits per character. BUG=b:37952913 BRANCH=none TEST=make runtests Change-Id: I474750a20204ba353cea1e91982aa03e8071c0c2 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/544177 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>