Export MariaDb from root

This commit is contained in:
Ryan Leckey 2019-09-10 23:44:38 -07:00
parent 64a2b3bb12
commit b911297586
3 changed files with 7 additions and 3 deletions

View File

@ -24,7 +24,6 @@ crossbeam-utils = { version = "0.6.6", default-features = false }
futures-channel-preview = "0.3.0-alpha.18"
futures-core-preview = "0.3.0-alpha.18"
futures-util-preview = "0.3.0-alpha.18"
hex = { version = "0.3.2", default-features = false }
log = "0.4.8"
md-5 = "0.8.0"
memchr = "2.2.1"

View File

@ -43,8 +43,13 @@ pub use self::{
#[cfg(feature = "mariadb")]
pub mod mariadb;
#[cfg(feature = "mariadb")]
#[doc(inline)]
pub use mariadb::MariaDb;
#[cfg(feature = "postgres")]
pub mod postgres;
#[cfg(feature = "postgres")]
#[doc(inline)]
pub use self::postgres::Postgres;

View File

@ -34,12 +34,12 @@ impl Encode for PasswordMessage<'_> {
hasher.input(password);
hasher.input(user);
let credentials = hex::encode(hasher.result_reset());
let credentials = format!("{:x}", hasher.result_reset());
hasher.input(credentials);
hasher.input(salt);
let salted = hex::encode(hasher.result());
let salted = format!("{:x}", hasher.result());
// len + "md5" + (salted)
buf.put_u32::<NetworkEndian>((4 + 3 + salted.len() + 1) as u32);