use crypto::sha1; use encoding::hex; use fmt; use hash; use os; use strings; export fn main() void = { const sha = sha1::sha1(); hash::write(&sha, strings::toutf8("Rosetta Code")); let sum: [sha1::SIZE]u8 = [0...]; hash::sum(&sha, sum); hex::encode(os::stdout, sum)!; fmt::println()!; };