diff --git a/Cargo.lock b/Cargo.lock index dddd26a5..b2082f9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,44 +19,14 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.6.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "aes-soft", - "aesni", - "cipher", -] - -[[package]] -name = "aes-ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7729c3cde54d67063be556aeac75a81330d802f0259500ca40cb52967f975763" -dependencies = [ - "aes-soft", - "aesni", + "cfg-if 1.0.0", "cipher", + "cpufeatures", "ctr", -] - -[[package]] -name = "aes-soft" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] - -[[package]] -name = "aesni" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" -dependencies = [ - "cipher", "opaque-debug", ] @@ -261,9 +231,9 @@ dependencies = [ [[package]] name = "cipher" -version = "0.2.5" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ "generic-array", ] @@ -380,9 +350,9 @@ dependencies = [ [[package]] name = "ctr" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ "cipher", ] @@ -1269,7 +1239,7 @@ dependencies = [ name = "librespot-audio" version = "0.3.1" dependencies = [ - "aes-ctr", + "aes", "byteorder", "bytes", "futures-core", @@ -1357,7 +1327,7 @@ dependencies = [ name = "librespot-discovery" version = "0.3.1" dependencies = [ - "aes-ctr", + "aes", "base64", "cfg-if 1.0.0", "dns-sd", diff --git a/audio/Cargo.toml b/audio/Cargo.toml index c7cf0d7b..3f220929 100644 --- a/audio/Cargo.toml +++ b/audio/Cargo.toml @@ -11,7 +11,7 @@ path = "../core" version = "0.3.1" [dependencies] -aes-ctr = "0.6" +aes = { version = "0.7", features = ["ctr"] } byteorder = "1.4" bytes = "1.0" futures-core = { version = "0.3", default-features = false } diff --git a/audio/src/decrypt.rs b/audio/src/decrypt.rs index e11241a9..912d1793 100644 --- a/audio/src/decrypt.rs +++ b/audio/src/decrypt.rs @@ -1,9 +1,7 @@ use std::io; -use aes_ctr::{ - cipher::{ - generic_array::GenericArray, NewStreamCipher, SyncStreamCipher, SyncStreamCipherSeek, - }, +use aes::{ + cipher::{generic_array::GenericArray, NewCipher, StreamCipher, StreamCipherSeek}, Aes128Ctr, }; diff --git a/core/Cargo.toml b/core/Cargo.toml index 271e5896..6822a8ba 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -13,7 +13,7 @@ path = "../protocol" version = "0.3.1" [dependencies] -aes = "0.6" +aes = "0.7" base64 = "0.13" byteorder = "1.4" bytes = "1" diff --git a/core/src/authentication.rs b/core/src/authentication.rs index a4d34e2b..82df5060 100644 --- a/core/src/authentication.rs +++ b/core/src/authentication.rs @@ -1,6 +1,6 @@ use std::io::{self, Read}; -use aes::Aes192; +use aes::{Aes192, BlockDecrypt}; use byteorder::{BigEndian, ByteOrder}; use hmac::Hmac; use pbkdf2::pbkdf2; diff --git a/discovery/Cargo.toml b/discovery/Cargo.toml index 0225ab68..373c4c76 100644 --- a/discovery/Cargo.toml +++ b/discovery/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/librespot-org/librespot" edition = "2018" [dependencies] -aes-ctr = "0.6" +aes = { version = "0.7", features = ["ctr"] } base64 = "0.13" cfg-if = "1.0" dns-sd = { version = "0.1.3", optional = true } diff --git a/discovery/src/server.rs b/discovery/src/server.rs index 9cf6837b..f3383228 100644 --- a/discovery/src/server.rs +++ b/discovery/src/server.rs @@ -8,9 +8,9 @@ use std::{ task::{Context, Poll}, }; -use aes_ctr::{ +use aes::{ cipher::generic_array::GenericArray, - cipher::{NewStreamCipher, SyncStreamCipher}, + cipher::{NewCipher, StreamCipher}, Aes128Ctr, }; use futures_core::Stream;