Skip to content

Commit f923f6e

Browse files
committed
chore: update crypto for 2024 edition
1 parent 0105e12 commit f923f6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+487
-408
lines changed

crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "core-crypto"
33
description = "Abstraction over OpenMLS with persistent keystore"
44
repository = "https://github.com/wireapp/core-crypto"
55
version = "4.1.0"
6-
edition = "2021"
6+
edition = "2024"
77
license = "GPL-3.0-only"
88
publish = false
99

crypto/benches/commit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// Benchmarks related to commit creation.
22
/// We're measuring the impact of different parameters on the runtime.
33
use criterion::{
4-
async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group, criterion_main, BatchSize,
5-
Criterion,
4+
BatchSize, Criterion, async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group,
5+
criterion_main,
66
};
77

88
use crate::utils::*;

crypto/benches/create_group.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use criterion::{
2-
async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group, criterion_main, BatchSize,
3-
BenchmarkId, Criterion,
2+
BatchSize, BenchmarkId, Criterion, async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group,
3+
criterion_main,
44
};
55

66
use core_crypto::prelude::{MlsConversationConfiguration, MlsCredentialType, MlsCustomConfiguration};

crypto/benches/encryption.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use criterion::{
2-
async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group, criterion_main, BatchSize,
3-
Criterion,
2+
BatchSize, Criterion, async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group,
3+
criterion_main,
44
};
55
use rand::distributions::{Alphanumeric, DistString};
66

crypto/benches/key_package.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use core_crypto::prelude::MlsCredentialType;
22
use criterion::{
3-
async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group, criterion_main, BatchSize,
4-
Criterion,
3+
BatchSize, Criterion, async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group,
4+
criterion_main,
55
};
66

77
use crate::utils::*;

crypto/benches/mls_proteus.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::utils::{proteus_bench::*, *};
22
use core_crypto::prelude::{CertificateBundle, MlsCiphersuite};
33
use criterion::{
4-
async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group, criterion_main, BatchSize,
5-
BenchmarkId, Criterion,
4+
BatchSize, BenchmarkId, Criterion, async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group,
5+
criterion_main,
66
};
77

88
use proteus::{

crypto/benches/proposal.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use criterion::{
2-
async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group, criterion_main, BatchSize,
3-
Criterion,
2+
BatchSize, Criterion, async_executor::AsyncStdExecutor as FuturesExecutor, black_box, criterion_group,
3+
criterion_main,
44
};
55

66
use crate::utils::*;

crypto/benches/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use criterion::async_executor::FuturesExecutor;
2-
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
2+
use criterion::{BatchSize, Criterion, criterion_group, criterion_main};
33
use openmls_traits::types::Ciphersuite;
44
use rand::distributions::{Alphanumeric, DistString};
55

crypto/benches/utils/mls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ use openmls::framing::MlsMessageOut;
1414
use openmls::{
1515
framing::MlsMessageInBody,
1616
prelude::{
17-
group_info::VerifiableGroupInfo, Credential, CredentialWithKey, CryptoConfig, KeyPackage, SignaturePublicKey,
17+
Credential, CredentialWithKey, CryptoConfig, KeyPackage, SignaturePublicKey, group_info::VerifiableGroupInfo,
1818
},
1919
};
2020
use openmls_basic_credential::SignatureKeyPair;
21-
use openmls_traits::{random::OpenMlsRand, types::Ciphersuite, OpenMlsCryptoProvider};
21+
use openmls_traits::{OpenMlsCryptoProvider, random::OpenMlsRand, types::Ciphersuite};
2222
use tls_codec::Deserialize;
2323

2424
#[derive(Copy, Clone, Eq, PartialEq)]

crypto/src/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
#[cfg(feature = "proteus")]
55
use crate::proteus::ProteusCentral;
66
use crate::{
7+
CoreCrypto, Error, KeystoreError, MlsError, MlsTransport, Result,
78
group_store::GroupStore,
89
mls::MlsCentral,
910
prelude::{Client, MlsConversation},
10-
CoreCrypto, Error, KeystoreError, MlsError, MlsTransport, Result,
1111
};
1212
use async_lock::{Mutex, RwLock, RwLockReadGuardArc, RwLockWriteGuardArc};
13-
use core_crypto_keystore::{connection::FetchFromDatabase, entities::ConsumerData, CryptoKeystoreError};
13+
use core_crypto_keystore::{CryptoKeystoreError, connection::FetchFromDatabase, entities::ConsumerData};
1414
use mls_crypto_provider::{CryptoKeystore, MlsCryptoProvider};
1515
use std::{ops::Deref, sync::Arc};
1616

0 commit comments

Comments
 (0)