Created
July 1, 2014 09:37
-
-
Save daschl/e1d8799b7e01538308d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[✗]─[michael@daschlbase]─[~/code/rust/ketama] | |
└──╼ cargo build | |
Fresh rust-crypto v0.1.0 (https://github.com/DaGenix/rust-crypto.git) | |
Compiling ketama-rs v0.1.0 (file:/Users/michaelnitschinger/code/rust/ketama) | |
src/ketama.rs:12:5: 12:19 error: type `rust-crypto::md5::Md5` does not implement any method in scope named `input_str` | |
src/ketama.rs:12 sh.input_str(key); | |
^~~~~~~~~~~~~~ | |
src/ketama.rs:13:13: 13:25 error: type `rust-crypto::md5::Md5` does not implement any method in scope named `result_str` | |
src/ketama.rs:13 println(sh.result_str()); | |
^~~~~~~~~~~~ | |
error: aborting due to 2 previous errors | |
Could not execute process `rustc src/ketama.rs --crate-type bin --out-dir /Users/michaelnitschinger/code/rust/ketama/target -L /Users/michaelnitschinger/code/rust/ketama/target -L /Users/michaelnitschinger/code/rust/ketama/target/deps` (status=101) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate crypto = "rust-crypto"; | |
use std::io::stdio::println; | |
use crypto::md5::Md5; | |
fn main() { | |
let key = "Hello world!"; | |
let sh = Md5::new(); | |
sh.input_str(key); | |
println(sh.result_str()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment