This commit is contained in:
Dennis Schwerdel 2019-01-04 12:32:48 +01:00
parent 416f903e39
commit 5d479d6d54
3 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,10 @@
This project follows [semantic versioning](http://semver.org).
### UNRELEASED
- [fixed] Hashed magics now also consider first character (**incompatible**)
### v0.8.2 (2018-01-02)
- [changed] Using serde instead of rustc_serialize

View File

@ -20,7 +20,7 @@ use super::util::now as util_now;
use super::poll::{Poll, Flags};
#[bench]
fn crypto_salsa20(b: &mut Bencher) {
fn crypto_chacha20(b: &mut Bencher) {
Crypto::init();
let mut crypto = Crypto::from_shared_key(CryptoMethod::ChaCha20, "test");
let mut payload = [0; 1500];

View File

@ -170,7 +170,7 @@ impl Config {
if let Some(ref name) = self.magic {
if name.starts_with("hash:") {
let mut s = SipHasher24::new();
name[6..].hash(&mut s);
name[5..].hash(&mut s);
let mut data = [0; 4];
Encoder::write_u32((s.finish() & 0xffff_ffff) as u32, &mut data);
data