Decoding can now either ignore padding, require correct padding, or require no padding. The default is to require correct padding.
The NO_PAD config now requires that padding be absent when decoding.
0.20.0-alpha.1
Breaking changes
Extended the Config concept into the Engine abstraction, allowing the user to pick different encoding / decoding implementations.
What was formerly the only algorithm is now the FastPortable engine, so named because it's portable (works on any CPU) and relatively fast.
This opens the door to a portable constant-time implementation (#153, presumably ConstantTimePortable?) for security-sensitive applications that need side-channel resistance, and CPU-specific SIMD implementations for more speed.
Standard base64 per the RFC is available via DEFAULT_ENGINE. To use different alphabets or other settings (padding, etc), create your own engine instance.
CharacterSet is now Alphabet (per the RFC), and allows creating custom alphabets. The corresponding tables that were previously code-generated are now built dynamically.
Since there are already multiple breaking changes, various functions are renamed to be more consistent and discoverable.
MSRV is now 1.47.0 to allow various things to use const fn.
DecoderReader now owns its inner reader, and can expose it via into_inner(). For symmetry, EncoderWriter can do the same with its writer.
encoded_len is now public so you can size encode buffers precisely.
0.13.1
More precise decode buffer sizing, avoiding unnecessary allocation in decode_config.
0.13.0
Config methods are const
Added EncoderStringWriter to allow encoding directly to a String
EncoderWriter now owns its delegate writer rather than keeping a reference to it (though refs still work)
As a consequence, it is now possible to extract the delegate writer from an EncoderWriter via finish(), which returns Result<W> instead of Result<()>. If you were calling finish() explicitly, you will now need to use let _ = foo.finish() instead of just foo.finish() to avoid a warning about the unused value.
When decoding input that has both an invalid length and an invalid symbol as the last byte, InvalidByte will be emitted instead of InvalidLength to make the problem more obvious.
0.12.2
Add BinHex alphabet
0.12.1
Add Bcrypt alphabet
0.12.0
A Read implementation (DecoderReader) to let users transparently decoded data from a b64 input source
IMAP's modified b64 alphabet
Relaxed type restrictions to just AsRef<[ut8]> for main encode*/decode* functions
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on base64 to permit the latest version.
Changelog
Sourced from base64's changelog.
... (truncated)
Commits
9fcde48
v0.20.068919ae
Merge pull request #202 from marshallpierce/mp/edition-2021f58f441
Also updated fuzzersd86e8c8
Update to edition 2021766fbc9
Merge pull request #198 from marshallpierce/mp/invalid-padding250323c
More fuzzer fixesbcbc669
Minor cleanup604a3ca
fix fuzzers0996b81
Merge branch 'master' into mp/invalid-padding442a809
Merge pull request #197 from marshallpierce/mp/update-msrvDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)