Migrated to redox_users

This commit is contained in:
Ivan Chebykin
2017-11-11 22:12:55 +03:00
parent 62412ef548
commit 681fd3d0ef
3 changed files with 15 additions and 20 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ extern crate liner;
extern crate pkgutils;
extern crate rand;
extern crate termion;
extern crate userutils;
extern crate redox_users;
use self::rand::Rng;
use self::termion::input::TermRead;
@@ -55,7 +55,7 @@ fn prompt_password(prompt: &str, confirm_prompt: &str) -> Result<String, String>
if confirm_password == password {
let salt = format!("{:X}", rand::OsRng::new().unwrap().next_u64());
Ok(userutils::Passwd::encode(&password, &salt))
Ok(redox_users::User::encode_passwd(&password, &salt))
} else {
Err("passwords do not match".to_string())
}