From 0db91230f96e274d61600fc3cc61691a575c8548 Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Tue, 9 Apr 2024 11:35:46 +0200 Subject: [PATCH] review --- lib/README.md | 36 ++++++++++++++++++------------------ lib/src/lib.rs | 6 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/README.md b/lib/README.md index 32cae46..f2d892e 100644 --- a/lib/README.md +++ b/lib/README.md @@ -3,24 +3,24 @@ This library provides the following common encodings: -| Name | Description | -| --- | --- | -| `HEXLOWER` | lowercase hexadecimal | -| `HEXLOWER_PERMISSIVE` | lowercase hexadecimal (case-insensitive decoding) | -| `HEXUPPER` | uppercase hexadecimal | -| `HEXUPPER_PERMISSIVE` | uppercase hexadecimal (case-insensitive decoding) | -| `BASE32` | RFC4648 base32 | -| `BASE32_NOPAD` | RFC4648 base32 (no padding) | -| `BASE32_DNSSEC` | RFC5155 base32 | -| `BASE32_DNSCURVE` | DNSCurve base32 | -| `BASE32HEX` | RFC4648 base32hex | -| `BASE32HEX_NOPAD` | RFC4648 base32hex (no padding) | -| `BASE64` | RFC4648 base64 | -| `BASE64_NOPAD` | RFC4648 base64 (no padding) | -| `BASE64_MIME` | RFC2045-like base64 | -| `BASE64_MIME_PERMISSIVE` | RFC2045-like base64 allowing trailing bits | -| `BASE64URL` | RFC4648 base64url | -| `BASE64URL_NOPAD` | RFC4648 base64url (no padding) | +| Name | Description | +|--------------------------|---------------------------------------------------| +| `HEXLOWER` | lowercase hexadecimal | +| `HEXLOWER_PERMISSIVE` | lowercase hexadecimal (case-insensitive decoding) | +| `HEXUPPER` | uppercase hexadecimal | +| `HEXUPPER_PERMISSIVE` | uppercase hexadecimal (case-insensitive decoding) | +| `BASE32` | RFC4648 base32 | +| `BASE32_NOPAD` | RFC4648 base32 (no padding) | +| `BASE32_DNSSEC` | RFC5155 base32 | +| `BASE32_DNSCURVE` | DNSCurve base32 | +| `BASE32HEX` | RFC4648 base32hex | +| `BASE32HEX_NOPAD` | RFC4648 base32hex (no padding) | +| `BASE64` | RFC4648 base64 | +| `BASE64_NOPAD` | RFC4648 base64 (no padding) | +| `BASE64_MIME` | RFC2045-like base64 | +| `BASE64_MIME_PERMISSIVE` | RFC2045-like base64 (ignoring trailing bits) | +| `BASE64URL` | RFC4648 base64url | +| `BASE64URL_NOPAD` | RFC4648 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 diff --git a/lib/src/lib.rs b/lib/src/lib.rs index a1896c2..ed8b194 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -2387,7 +2387,7 @@ const BASE64_NOPAD_IMPL: &[u8] = &[ /// This encoding is a static version of: /// /// ```rust -/// # use data_encoding::{Specification, Wrap, BASE64_MIME}; +/// # use data_encoding::{Specification, BASE64_MIME}; /// let mut spec = Specification::new(); /// spec.symbols.push_str("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); /// spec.padding = Some('='); @@ -2429,12 +2429,12 @@ const BASE64_MIME_IMPL: &[u8] = &[ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 61, 30, 76, 13, 10, ]; -/// Permissive MIME base64 encoding, it is like BASE64_MIME but allows trailing bits +/// MIME base64 encoding without trailing bits check /// /// This encoding is a static version of: /// /// ```rust -/// # use data_encoding::{Specification, Wrap, BASE64_MIME_PERMISSIVE}; +/// # use data_encoding::{Specification, BASE64_MIME_PERMISSIVE}; /// let mut spec = Specification::new(); /// spec.symbols.push_str("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); /// spec.padding = Some('=');