[Austen Adler]: Update `async` feature targets to tokio-1

Bumped major version as this is a breaking change.

Patch by: https://austenadler.com/

Fortune for cryptohelpers's current commit: Small curse − 小凶
master
Avril 2 years ago
parent dfddaf0484
commit a0d4d2aeba
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,6 +1,6 @@
[package] [package]
name = "cryptohelpers" name = "cryptohelpers"
version = "1.8.2" version = "2.0.0"
license= "MIT" license= "MIT"
description = "Collection of helpers and simplifying functions for cryptography things" description = "Collection of helpers and simplifying functions for cryptography things"
authors = ["Avril <flanchan@cumallover.me>"] authors = ["Avril <flanchan@cumallover.me>"]
@ -17,7 +17,7 @@ getrandom = {version = "0.1", optional = true }
crc = {version = "1.8", optional = true } crc = {version = "1.8", optional = true }
hex-literal = {version = "0.3", optional = true } hex-literal = {version = "0.3", optional = true }
libc = "0.2" libc = "0.2"
tokio = {version = "0.2", features=["io-util"], optional=true} tokio = { version = "^1.17", features = ["io-util"], optional = true }
serde_derive = {version = "1.0", optional = true} serde_derive = {version = "1.0", optional = true}
serde = {version = "1.0", optional = true} serde = {version = "1.0", optional = true}
futures = {version = "0.3.8", optional=true} futures = {version = "0.3.8", optional=true}

@ -14,12 +14,11 @@ use openssl::{
}, },
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
io::{ AsyncRead,
AsyncRead, AsyncReadExt,
AsyncWrite, AsyncWrite,
}, AsyncWriteExt,
prelude::*,
}; };
use getrandom::getrandom; use getrandom::getrandom;

@ -11,9 +11,9 @@ use crc::{
Hasher64, Hasher64,
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
prelude::*, AsyncRead,
io::AsyncRead, AsyncReadExt,
}; };
use consts::BUFFER_SIZE; use consts::BUFFER_SIZE;

@ -13,12 +13,11 @@ use openssl::{
pkey::HasPrivate, pkey::HasPrivate,
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
io::{ AsyncWrite,
AsyncWrite, AsyncWriteExt,
AsyncRead, AsyncRead,
}, AsyncReadExt,
prelude::*,
}; };
use consts::RSA_PADDING_NEEDS as PADDING_NEEDS; use consts::RSA_PADDING_NEEDS as PADDING_NEEDS;

@ -37,12 +37,11 @@ use openssl::{
symm::Cipher, symm::Cipher,
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
io::{ AsyncWrite,
AsyncWrite, AsyncWriteExt,
AsyncRead, AsyncRead,
}, AsyncReadExt,
prelude::*,
}; };
/// Container for the private & public parts of an RSA key /// Container for the private & public parts of an RSA key

@ -33,12 +33,11 @@ use openssl::{
}, },
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
io::{ AsyncWrite,
AsyncWrite, AsyncWriteExt,
AsyncRead, AsyncRead,
}, AsyncReadExt,
prelude::*,
}; };
/// Container for RSA public key components /// Container for RSA public key components

@ -27,11 +27,9 @@ use openssl::{
}, },
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
io::{ AsyncRead,
AsyncRead, AsyncReadExt,
},
prelude::*,
}; };
use consts::RSA_SIG_SIZE as SIZE; use consts::RSA_SIG_SIZE as SIZE;
use consts::BUFFER_SIZE; use consts::BUFFER_SIZE;

@ -10,9 +10,9 @@ use sha2::{
Digest, Sha256, Digest, Sha256,
}; };
#[cfg(feature="async")] #[cfg(feature="async")]
use tokio::{ use tokio::io::{
io::AsyncRead, AsyncRead,
prelude::*, AsyncReadExt,
}; };
pub const SIZE: usize = consts::SHA256_SIZE; pub const SIZE: usize = consts::SHA256_SIZE;

Loading…
Cancel
Save