commit | 66d75534e9125c47d3a24cabc4bd88785a62f534 | [log] [tgz] |
---|---|---|
author | Josh Nohle <nohle@google.com> | Tue May 21 20:46:50 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue May 21 20:46:50 2019 |
tree | 6176a9b4d8bf140fcae6fe0ad2d2e0e04d2a6576 | |
parent | b6d55d09053147d16b0a4b8e70bbfb7158d33657 [diff] |
[Enrollment v2] Move base64 encoding for pref values to util functions We currently store strings in preferences, and these string are required to be valid UTF-8 strings; this is a requirement of base::Value. So, strings are base64-encoded before being persisted to prefs. This is particularly necessary for byte strings such as serialized protos. We create a file of utility functions to perform this encoding and decoding in order to ensure uniformity. We choose to use Base64Url encoding to conform with CryptAuth v1 Enrollment and DeviceSync client implementations. Note that previously, Base64 (not Base64Url) was used in v2 Enrollment; however, there is no risk of conflicting encodings being stored in the prefs because v2 Enrollment has not been rolled out yet. These changes will be included in M76 which is the version that v2 Enrollment will be rolled out on. Bug: 899080, 964563 Change-Id: Ifa6eb5ed9128ea788021146e48eaadd65198691e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618005 Commit-Queue: Josh Nohle <nohle@chromium.org> Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#661889}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .