RosettaCodeData/Task/SHA-1/Hare/sha-1.hare
2025-08-11 18:05:26 -07:00

16 lines
308 B
Text

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()!;
};