| 1 |
# 0.21.7 |
| 2 |
|
| 3 |
- Support getting an alphabet's contents as a str via `Alphabet::as_str()` |
| 4 |
|
| 5 |
# 0.21.6 |
| 6 |
|
| 7 |
- Improved introductory documentation and example |
| 8 |
|
| 9 |
# 0.21.5 |
| 10 |
|
| 11 |
- Add `Debug` and `Clone` impls for the general purpose Engine |
| 12 |
|
| 13 |
# 0.21.4 |
| 14 |
|
| 15 |
- Make `encoded_len` `const`, allowing the creation of arrays sized to encode compile-time-known data lengths |
| 16 |
|
| 17 |
# 0.21.3 |
| 18 |
|
| 19 |
- Implement `source` instead of `cause` on Error types |
| 20 |
- Roll back MSRV to 1.48.0 so Debian can continue to live in a time warp |
| 21 |
- Slightly faster chunked encoding for short inputs |
| 22 |
- Decrease binary size |
| 23 |
|
| 24 |
# 0.21.2 |
| 25 |
|
| 26 |
- Rollback MSRV to 1.57.0 -- only dev dependencies need 1.60, not the main code |
| 27 |
|
| 28 |
# 0.21.1 |
| 29 |
|
| 30 |
- Remove the possibility of panicking during decoded length calculations |
| 31 |
- `DecoderReader` no longer sometimes erroneously ignores |
| 32 |
padding [#226](https://github.com/marshallpierce/rust-base64/issues/226) |
| 33 |
|
| 34 |
## Breaking changes |
| 35 |
|
| 36 |
- `Engine.internal_decode` return type changed |
| 37 |
- Update MSRV to 1.60.0 |
| 38 |
|
| 39 |
# 0.21.0 |
| 40 |
|
| 41 |
## Migration |
| 42 |
|
| 43 |
### Functions |
| 44 |
|
| 45 |
| < 0.20 function | 0.21 equivalent | |
| 46 |
|-------------------------|-------------------------------------------------------------------------------------| |
| 47 |
| `encode()` | `engine::general_purpose::STANDARD.encode()` or `prelude::BASE64_STANDARD.encode()` | |
| 48 |
| `encode_config()` | `engine.encode()` | |
| 49 |
| `encode_config_buf()` | `engine.encode_string()` | |
| 50 |
| `encode_config_slice()` | `engine.encode_slice()` | |
| 51 |
| `decode()` | `engine::general_purpose::STANDARD.decode()` or `prelude::BASE64_STANDARD.decode()` | |
| 52 |
| `decode_config()` | `engine.decode()` | |
| 53 |
| `decode_config_buf()` | `engine.decode_vec()` | |
| 54 |
| `decode_config_slice()` | `engine.decode_slice()` | |
| 55 |
|
| 56 |
The short-lived 0.20 functions were the 0.13 functions with `config` replaced with `engine`. |
| 57 |
|
| 58 |
### Padding |
| 59 |
|
| 60 |
If applicable, use the preset engines `engine::STANDARD`, `engine::STANDARD_NO_PAD`, `engine::URL_SAFE`, |
| 61 |
or `engine::URL_SAFE_NO_PAD`. |
| 62 |
The `NO_PAD` ones require that padding is absent when decoding, and the others require that |
| 63 |
canonical padding is present . |
| 64 |
|
| 65 |
If you need the < 0.20 behavior that did not care about padding, or want to recreate < 0.20.0's predefined `Config`s |
| 66 |
precisely, see the following table. |
| 67 |
|
| 68 |
| 0.13.1 Config | 0.20.0+ alphabet | `encode_padding` | `decode_padding_mode` | |
| 69 |
|-----------------|------------------|------------------|-----------------------| |
| 70 |
| STANDARD | STANDARD | true | Indifferent | |
| 71 |
| STANDARD_NO_PAD | STANDARD | false | Indifferent | |
| 72 |
| URL_SAFE | URL_SAFE | true | Indifferent | |
| 73 |
| URL_SAFE_NO_PAD | URL_SAFE | false | Indifferent | |
| 74 |
|
| 75 |
# 0.21.0-rc.1 |
| 76 |
|
| 77 |
- Restore the ability to decode into a slice of precisely the correct length with `Engine.decode_slice_unchecked`. |
| 78 |
- Add `Engine` as a `pub use` in `prelude`. |
| 79 |
|
| 80 |
# 0.21.0-beta.2 |
| 81 |
|
| 82 |
## Breaking changes |
| 83 |
|
| 84 |
- Re-exports of preconfigured engines in `engine` are removed in favor of `base64::prelude::...` that are better suited |
| 85 |
to those who wish to `use` the entire path to a name. |
| 86 |
|
| 87 |
# 0.21.0-beta.1 |
| 88 |
|
| 89 |
## Breaking changes |
| 90 |
|
| 91 |
- `FastPortable` was only meant to be an interim name, and shouldn't have shipped in 0.20. It is now `GeneralPurpose` to |
| 92 |
make its intended usage more clear. |
| 93 |
- `GeneralPurpose` and its config are now `pub use`'d in the `engine` module for convenience. |
| 94 |
- Change a few `from()` functions to be `new()`. `from()` causes confusing compiler errors because of confusion |
| 95 |
with `From::from`, and is a little misleading because some of those invocations are not very cheap as one would |
| 96 |
usually expect from a `from` call. |
| 97 |
- `encode*` and `decode*` top level functions are now methods on `Engine`. |
| 98 |
- `DEFAULT_ENGINE` was replaced by `engine::general_purpose::STANDARD` |
| 99 |
- Predefined engine consts `engine::general_purpose::{STANDARD, STANDARD_NO_PAD, URL_SAFE, URL_SAFE_NO_PAD}` |
| 100 |
- These are `pub use`d into `engine` as well |
| 101 |
- The `*_slice` decode/encode functions now return an error instead of panicking when the output slice is too small |
| 102 |
- As part of this, there isn't now a public way to decode into a slice _exactly_ the size needed for inputs that |
| 103 |
aren't multiples of 4 tokens. If adding up to 2 bytes to always be a multiple of 3 bytes for the decode buffer is |
| 104 |
a problem, file an issue. |
| 105 |
|
| 106 |
## Other changes |
| 107 |
|
| 108 |
- `decoded_len_estimate()` is provided to make it easy to size decode buffers correctly. |
| 109 |
|
| 110 |
# 0.20.0 |
| 111 |
|
| 112 |
## Breaking changes |
| 113 |
|
| 114 |
- Update MSRV to 1.57.0 |
| 115 |
- Decoding can now either ignore padding, require correct padding, or require no padding. The default is to require |
| 116 |
correct padding. |
| 117 |
- The `NO_PAD` config now requires that padding be absent when decoding. |
| 118 |
|
| 119 |
## 0.20.0-alpha.1 |
| 120 |
|
| 121 |
### Breaking changes |
| 122 |
|
| 123 |
- Extended the `Config` concept into the `Engine` abstraction, allowing the user to pick different encoding / decoding |
| 124 |
implementations. |
| 125 |
- What was formerly the only algorithm is now the `FastPortable` engine, so named because it's portable (works on |
| 126 |
any CPU) and relatively fast. |
| 127 |
- This opens the door to a portable constant-time |
| 128 |
implementation ([#153](https://github.com/marshallpierce/rust-base64/pull/153), |
| 129 |
presumably `ConstantTimePortable`?) for security-sensitive applications that need side-channel resistance, and |
| 130 |
CPU-specific SIMD implementations for more speed. |
| 131 |
- Standard base64 per the RFC is available via `DEFAULT_ENGINE`. To use different alphabets or other settings ( |
| 132 |
padding, etc), create your own engine instance. |
| 133 |
- `CharacterSet` is now `Alphabet` (per the RFC), and allows creating custom alphabets. The corresponding tables that |
| 134 |
were previously code-generated are now built dynamically. |
| 135 |
- Since there are already multiple breaking changes, various functions are renamed to be more consistent and |
| 136 |
discoverable. |
| 137 |
- MSRV is now 1.47.0 to allow various things to use `const fn`. |
| 138 |
- `DecoderReader` now owns its inner reader, and can expose it via `into_inner()`. For symmetry, `EncoderWriter` can do |
| 139 |
the same with its writer. |
| 140 |
- `encoded_len` is now public so you can size encode buffers precisely. |
| 141 |
|
| 142 |
# 0.13.1 |
| 143 |
|
| 144 |
- More precise decode buffer sizing, avoiding unnecessary allocation in `decode_config`. |
| 145 |
|
| 146 |
# 0.13.0 |
| 147 |
|
| 148 |
- Config methods are const |
| 149 |
- Added `EncoderStringWriter` to allow encoding directly to a String |
| 150 |
- `EncoderWriter` now owns its delegate writer rather than keeping a reference to it (though refs still work) |
| 151 |
- As a consequence, it is now possible to extract the delegate writer from an `EncoderWriter` via `finish()`, which |
| 152 |
returns `Result<W>` instead of `Result<()>`. If you were calling `finish()` explicitly, you will now need to |
| 153 |
use `let _ = foo.finish()` instead of just `foo.finish()` to avoid a warning about the unused value. |
| 154 |
- When decoding input that has both an invalid length and an invalid symbol as the last byte, `InvalidByte` will be |
| 155 |
emitted instead of `InvalidLength` to make the problem more obvious. |
| 156 |
|
| 157 |
# 0.12.2 |
| 158 |
|
| 159 |
- Add `BinHex` alphabet |
| 160 |
|
| 161 |
# 0.12.1 |
| 162 |
|
| 163 |
- Add `Bcrypt` alphabet |
| 164 |
|
| 165 |
# 0.12.0 |
| 166 |
|
| 167 |
- A `Read` implementation (`DecoderReader`) to let users transparently decoded data from a b64 input source |
| 168 |
- IMAP's modified b64 alphabet |
| 169 |
- Relaxed type restrictions to just `AsRef<[ut8]>` for main `encode*`/`decode*` functions |
| 170 |
- A minor performance improvement in encoding |
| 171 |
|
| 172 |
# 0.11.0 |
| 173 |
|
| 174 |
- Minimum rust version 1.34.0 |
| 175 |
- `no_std` is now supported via the two new features `alloc` and `std`. |
| 176 |
|
| 177 |
# 0.10.1 |
| 178 |
|
| 179 |
- Minimum rust version 1.27.2 |
| 180 |
- Fix bug in streaming encoding ([#90](https://github.com/marshallpierce/rust-base64/pull/90)): if the underlying writer |
| 181 |
didn't write all the bytes given to it, the remaining bytes would not be retried later. See the docs |
| 182 |
on `EncoderWriter::write`. |
| 183 |
- Make it configurable whether or not to return an error when decoding detects excess trailing bits. |
| 184 |
|
| 185 |
# 0.10.0 |
| 186 |
|
| 187 |
- Remove line wrapping. Line wrapping was never a great conceptual fit in this library, and other features (streaming |
| 188 |
encoding, etc) either couldn't support it or could support only special cases of it with a great increase in |
| 189 |
complexity. Line wrapping has been pulled out into a [line-wrap](https://crates.io/crates/line-wrap) crate, so it's |
| 190 |
still available if you need it. |
| 191 |
- `Base64Display` creation no longer uses a `Result` because it can't fail, which means its helper methods for |
| 192 |
common |
| 193 |
configs that `unwrap()` for you are no longer needed |
| 194 |
- Add a streaming encoder `Write` impl to transparently base64 as you write. |
| 195 |
- Remove the remaining `unsafe` code. |
| 196 |
- Remove whitespace stripping to simplify `no_std` support. No out of the box configs use it, and it's trivial to do |
| 197 |
yourself if needed: `filter(|b| !b" \n\t\r\x0b\x0c".contains(b)`. |
| 198 |
- Detect invalid trailing symbols when decoding and return an error rather than silently ignoring them. |
| 199 |
|
| 200 |
# 0.9.3 |
| 201 |
|
| 202 |
- Update safemem |
| 203 |
|
| 204 |
# 0.9.2 |
| 205 |
|
| 206 |
- Derive `Clone` for `DecodeError`. |
| 207 |
|
| 208 |
# 0.9.1 |
| 209 |
|
| 210 |
- Add support for `crypt(3)`'s base64 variant. |
| 211 |
|
| 212 |
# 0.9.0 |
| 213 |
|
| 214 |
- `decode_config_slice` function for no-allocation decoding, analogous to `encode_config_slice` |
| 215 |
- Decode performance optimization |
| 216 |
|
| 217 |
# 0.8.0 |
| 218 |
|
| 219 |
- `encode_config_slice` function for no-allocation encoding |
| 220 |
|
| 221 |
# 0.7.0 |
| 222 |
|
| 223 |
- `STANDARD_NO_PAD` config |
| 224 |
- `Base64Display` heap-free wrapper for use in format strings, etc |
| 225 |
|
| 226 |
# 0.6.0 |
| 227 |
|
| 228 |
- Decode performance improvements |
| 229 |
- Use `unsafe` in fewer places |
| 230 |
- Added fuzzers |
| 231 |
|
| 232 |
# 0.5.2 |
| 233 |
|
| 234 |
- Avoid usize overflow when calculating length |
| 235 |
- Better line wrapping performance |
| 236 |
|
| 237 |
# 0.5.1 |
| 238 |
|
| 239 |
- Temporarily disable line wrapping |
| 240 |
- Add Apache 2.0 license |
| 241 |
|
| 242 |
# 0.5.0 |
| 243 |
|
| 244 |
- MIME support, including configurable line endings and line wrapping |
| 245 |
- Removed `decode_ws` |
| 246 |
- Renamed `Base64Error` to `DecodeError` |
| 247 |
|
| 248 |
# 0.4.1 |
| 249 |
|
| 250 |
- Allow decoding a `AsRef<[u8]>` instead of just a `&str` |
| 251 |
|
| 252 |
# 0.4.0 |
| 253 |
|
| 254 |
- Configurable padding |
| 255 |
- Encode performance improvements |
| 256 |
|
| 257 |
# 0.3.0 |
| 258 |
|
| 259 |
- Added encode/decode functions that do not allocate their own storage |
| 260 |
- Decode performance improvements |
| 261 |
- Extraneous padding bytes are no longer ignored. Now, an error will be returned. |