Import data-encoding crate am: a5641d4897

Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/data-encoding/+/2637330

Change-Id: Ic9a77fc90c6e8c46a14b8e0795968197214c5574
Signed-off-by: Automerger Merge Worker 
tree: a6443812f9b77f11bdbaeec3a44dce1837be121f
  1. src/
  2. Android.bp
  3. Cargo.toml
  4. Cargo.toml.orig
  5. LICENSE
  6. METADATA
  7. MODULE_LICENSE_MIT
  8. OWNERS
  9. README.md
README.md

CI Status Coverage Status

This library provides the following common encodings:

NameDescription
HEXLOWERlowercase hexadecimal
HEXLOWER_PERMISSIVElowercase hexadecimal (case-insensitive decoding)
HEXUPPERuppercase hexadecimal
HEXUPPER_PERMISSIVEuppercase hexadecimal (case-insensitive decoding)
BASE32RFC4648 base32
BASE32_NOPADRFC4648 base32 (no padding)
BASE32_DNSSECRFC5155 base32
BASE32_DNSCURVEDNSCurve base32
BASE32HEXRFC4648 base32hex
BASE32HEX_NOPADRFC4648 base32hex (no padding)
BASE64RFC4648 base64
BASE64_NOPADRFC4648 base64 (no padding)
BASE64_MIMERFC2045-like base64
BASE64URLRFC4648 base64url
BASE64URL_NOPADRFC4648 base64url (no padding)

It also provides the possibility to define custom little-endian ASCII base-conversion encodings for bases of size 2, 4, 8, 16, 32, and 64 (for which all above use-cases are particular instances).

See the documentation for more details.