1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-05 02:39:53 +02:00

Merge remote-tracking branch 'librespot-org/dev' into new-api-wip

This commit is contained in:
Roderick van Domburg 2021-12-08 19:11:53 +01:00
commit f03a7e95c1
No known key found for this signature in database
GPG key ID: A9EF5222A26F0451
48 changed files with 2297 additions and 1287 deletions

View file

@ -124,7 +124,7 @@ fn compute_keys(shared_secret: &[u8], packets: &[u8]) -> (Vec<u8>, Vec<u8>, Vec<
let mut data = Vec::with_capacity(0x64);
for i in 1..6 {
let mut mac =
HmacSha1::new_from_slice(&shared_secret).expect("HMAC can take key of any size");
HmacSha1::new_from_slice(shared_secret).expect("HMAC can take key of any size");
mac.update(packets);
mac.update(&[i]);
data.extend_from_slice(&mac.finalize().into_bytes());