Skip to content

base64ct: bump edition to 2024 (MSRV 1.85); add back to workspace #1839

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/base64ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.81.0 # MSRV
- 1.85.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
Expand All @@ -47,7 +47,7 @@ jobs:
strategy:
matrix:
rust:
- 1.81.0 # MSRV
- 1.85.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
Expand Down
20 changes: 18 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = [
"base16ct",
"base32ct",
#"base64ct",
"base64ct",
"cmpv2",
"cms",
"const-oid",
Expand All @@ -27,9 +27,6 @@ members = [
"x509-cert/test-support",
"x509-ocsp"
]
exclude = [
"base64ct",
]

[profile.dev]
opt-level = 2
Expand Down Expand Up @@ -65,7 +62,7 @@ x509-ocsp = { path = "./x509-ocsp" }

# https://github.com/RustCrypto/signatures/pull/913
# https://github.com/RustCrypto/signatures/pull/923
ecdsa = { git = "https://github.com/RustCrypto/signatures.git" }
ecdsa = { git = "https://github.com/RustCrypto/signatures.git" }
rfc6979 = { git = "https://github.com/RustCrypto/signatures.git" }
# https://github.com/RustCrypto/key-wraps/pull/34
# https://github.com/RustCrypto/key-wraps/pull/35
Expand All @@ -78,10 +75,10 @@ ansi-x963-kdf = { git = "https://github.com/RustCrypto/KDFs.git" }


# https://github.com/RustCrypto/traits/pull/1777
crypto-common = { git = "https://github.com/RustCrypto/traits.git" }
crypto-common = { git = "https://github.com/RustCrypto/traits.git" }
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" }
signature = { git = "https://github.com/RustCrypto/traits.git" }
aead = { git = "https://github.com/RustCrypto/traits.git" }
signature = { git = "https://github.com/RustCrypto/traits.git" }
aead = { git = "https://github.com/RustCrypto/traits.git" }

# https://github.com/RustCrypto/RSA/pull/478
# https://github.com/RustCrypto/RSA/pull/504
Expand Down
204 changes: 0 additions & 204 deletions base64ct/Cargo.lock

This file was deleted.

6 changes: 3 additions & 3 deletions base64ct/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "base64ct"
version = "1.7.3"
version = "1.8.0-pre"
description = """
Pure Rust implementation of Base64 (RFC 4648) which avoids any usages of
data-dependent branches/LUTs and thereby provides portable "best effort"
Expand All @@ -14,8 +14,8 @@ repository = "https://github.com/RustCrypto/formats"
categories = ["cryptography", "encoding", "no-std", "parser-implementations"]
keywords = ["crypto", "base64", "pem", "phc"]
readme = "README.md"
edition = "2021"
rust-version = "1.81"
edition = "2024"
rust-version = "1.85"

[dev-dependencies]
base64 = "0.22"
Expand Down
4 changes: 2 additions & 2 deletions base64ct/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fixed-width line wrapping.

## Minimum Supported Rust Version

This crate requires **Rust 1.81** at a minimum.
This crate requires **Rust 1.85** at a minimum.

We may change the MSRV in the future, but it will be accompanied by a minor
version bump.
Expand Down Expand Up @@ -72,7 +72,7 @@ dual licensed as above, without any additional terms or conditions.
[build-image]: https://github.com/RustCrypto/formats/actions/workflows/base64ct.yml/badge.svg
[build-link]: https://github.com/RustCrypto/formats/actions/workflows/base64ct.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.81+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.85+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/300570-formats

Expand Down
7 changes: 3 additions & 4 deletions base64ct/src/decoder.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
//! Buffered Base64 decoder.

use crate::{
encoding,
line_ending::{CHAR_CR, CHAR_LF},
Encoding,
Error::{self, InvalidLength},
MIN_LINE_WIDTH,
MIN_LINE_WIDTH, encoding,
line_ending::{CHAR_CR, CHAR_LF},
};
use core::{cmp, marker::PhantomData};

Expand Down Expand Up @@ -545,7 +544,7 @@ impl<'i> Iterator for LineReader<'i> {
#[cfg(test)]
#[allow(clippy::unwrap_used)]
mod tests {
use crate::{alphabet::Alphabet, test_vectors::*, Base64, Base64Unpadded, Decoder};
use crate::{Base64, Base64Unpadded, Decoder, alphabet::Alphabet, test_vectors::*};

#[cfg(feature = "std")]
use {alloc::vec::Vec, std::io::Read};
Expand Down
2 changes: 1 addition & 1 deletion base64ct/src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl LineWrapper {
#[cfg(test)]
#[allow(clippy::unwrap_used)]
mod tests {
use crate::{alphabet::Alphabet, test_vectors::*, Base64, Base64Unpadded, Encoder, LineEnding};
use crate::{Base64, Base64Unpadded, Encoder, LineEnding, alphabet::Alphabet, test_vectors::*};

#[test]
fn encode_padded() {
Expand Down
6 changes: 2 additions & 4 deletions base64ct/src/test_vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ pub(crate) const UNPADDED_BIN: &[u8] = &[
];

/// Padded multi-line Base64 example (from the `ssh-key` crate's `id_ed25519`)
pub(crate) const MULTILINE_PADDED_BASE64: &str =
"b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\
pub(crate) const MULTILINE_PADDED_BASE64: &str = "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\n\
QyNTUxOQAAACCzPq7zfqLffKoBDe/eo04kH2XxtSmk9D7RQyf1xUqrYgAAAJgAIAxdACAM\n\
XQAAAAtzc2gtZWQyNTUxOQAAACCzPq7zfqLffKoBDe/eo04kH2XxtSmk9D7RQyf1xUqrYg\n\
AAAEC2BsIi0QwW2uFscKTUUXNHLsYX4FxlaSDSblbAj7WR7bM+rvN+ot98qgEN796jTiQf\n\
Expand All @@ -42,8 +41,7 @@ pub(crate) const MULTILINE_PADDED_BIN: &[u8] = &[
];

/// Unpadded multi-line Base64 example (from the `ssh-key` crate's `id_ecdsa_p256`).
pub(crate) const MULTILINE_UNPADDED_BASE64: &str =
"b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS\n\
pub(crate) const MULTILINE_UNPADDED_BASE64: &str = "b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS\n\
1zaGEyLW5pc3RwMjU2AAAACG5pc3RwMjU2AAAAQQR8H9hzDOU0V76NkkCY7DZIgw+Sqooj\n\
Y6xlb91FIfpjE+UR8YkbTp5ar44ULQatFaZqQlfz8FHYTooOL5G6gHBHAAAAsB8RBhUfEQ\n\
YVAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHwf2HMM5TRXvo2S\n\
Expand Down