Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.13.0
->0.22.0
Release Notes
marshallpierce/rust-base64 (base64)
v0.22.0
Compare Source
DecodeSliceError::OutputSliceTooSmall
is now conservative rather than precise. That is, the error will only occur if the decoded output cannot fit, meaning thatEngine::decode_slice
can now be used with exactly-sized output slices. As part of this,Engine::internal_decode
now returnsDecodeSliceError
instead ofDecodeError
, but that is not expected to affect any external callers.DecodeError::InvalidLength
now refers specifically to the number of valid symbols being invalid (i.e.len % 4 == 1
), rather than just the number of input bytes. This avoids confusing scenarios when based on interpretation you could make a case for eitherInvalidLength
orInvalidByte
being appropriate.v0.21.7
Compare Source
Alphabet::as_str()
v0.21.6
Compare Source
v0.21.5
Compare Source
Debug
andClone
impls for the general purpose Enginev0.21.4
Compare Source
encoded_len
const
, allowing the creation of arrays sized to encode compile-time-known data lengthsv0.21.3
Compare Source
source
instead ofcause
on Error typesv0.21.2
Compare Source
v0.21.1
Compare Source
DecoderReader
no longer sometimes erroneously ignorespadding #226
Breaking changes
Engine.internal_decode
return type changedv0.21.0
Compare Source
Migration
Functions
encode()
engine::general_purpose::STANDARD.encode()
orprelude::BASE64_STANDARD.encode()
encode_config()
engine.encode()
encode_config_buf()
engine.encode_string()
encode_config_slice()
engine.encode_slice()
decode()
engine::general_purpose::STANDARD.decode()
orprelude::BASE64_STANDARD.decode()
decode_config()
engine.decode()
decode_config_buf()
engine.decode_vec()
decode_config_slice()
engine.decode_slice()
The short-lived 0.20 functions were the 0.13 functions with
config
replaced withengine
.Padding
If applicable, use the preset engines
engine::STANDARD
,engine::STANDARD_NO_PAD
,engine::URL_SAFE
,or
engine::URL_SAFE_NO_PAD
.The
NO_PAD
ones require that padding is absent when decoding, and the others require thatcanonical padding is present .
If you need the < 0.20 behavior that did not care about padding, or want to recreate < 0.20.0's predefined
Config
sprecisely, see the following table.
encode_padding
decode_padding_mode
v0.20.0
Compare Source
Breaking changes
correct padding.
NO_PAD
config now requires that padding be absent when decoding.0.20.0-alpha.1
Breaking changes
Config
concept into theEngine
abstraction, allowing the user to pick different encoding / decodingimplementations.
FastPortable
engine, so named because it's portable (works onany CPU) and relatively fast.
implementation (#153,
presumably
ConstantTimePortable
?) for security-sensitive applications that need side-channel resistance, andCPU-specific SIMD implementations for more speed.
DEFAULT_ENGINE
. To use different alphabets or other settings (padding, etc), create your own engine instance.
CharacterSet
is nowAlphabet
(per the RFC), and allows creating custom alphabets. The corresponding tables thatwere previously code-generated are now built dynamically.
discoverable.
const fn
.DecoderReader
now owns its inner reader, and can expose it viainto_inner()
. For symmetry,EncoderWriter
can dothe same with its writer.
encoded_len
is now public so you can size encode buffers precisely.v0.13.1
Compare Source
decode_config
.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.