mirror of https://github.com/dswd/vpncloud.git
Fixes
This commit is contained in:
parent
416f903e39
commit
5d479d6d54
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
This project follows [semantic versioning](http://semver.org).
|
This project follows [semantic versioning](http://semver.org).
|
||||||
|
|
||||||
|
### UNRELEASED
|
||||||
|
|
||||||
|
- [fixed] Hashed magics now also consider first character (**incompatible**)
|
||||||
|
|
||||||
### v0.8.2 (2018-01-02)
|
### v0.8.2 (2018-01-02)
|
||||||
|
|
||||||
- [changed] Using serde instead of rustc_serialize
|
- [changed] Using serde instead of rustc_serialize
|
||||||
|
|
|
@ -20,7 +20,7 @@ use super::util::now as util_now;
|
||||||
use super::poll::{Poll, Flags};
|
use super::poll::{Poll, Flags};
|
||||||
|
|
||||||
#[bench]
|
#[bench]
|
||||||
fn crypto_salsa20(b: &mut Bencher) {
|
fn crypto_chacha20(b: &mut Bencher) {
|
||||||
Crypto::init();
|
Crypto::init();
|
||||||
let mut crypto = Crypto::from_shared_key(CryptoMethod::ChaCha20, "test");
|
let mut crypto = Crypto::from_shared_key(CryptoMethod::ChaCha20, "test");
|
||||||
let mut payload = [0; 1500];
|
let mut payload = [0; 1500];
|
||||||
|
|
|
@ -170,7 +170,7 @@ impl Config {
|
||||||
if let Some(ref name) = self.magic {
|
if let Some(ref name) = self.magic {
|
||||||
if name.starts_with("hash:") {
|
if name.starts_with("hash:") {
|
||||||
let mut s = SipHasher24::new();
|
let mut s = SipHasher24::new();
|
||||||
name[6..].hash(&mut s);
|
name[5..].hash(&mut s);
|
||||||
let mut data = [0; 4];
|
let mut data = [0; 4];
|
||||||
Encoder::write_u32((s.finish() & 0xffff_ffff) as u32, &mut data);
|
Encoder::write_u32((s.finish() & 0xffff_ffff) as u32, &mut data);
|
||||||
data
|
data
|
||||||
|
|
Loading…
Reference in New Issue