1
0
Fork 0
forked from fun/fun
fun/examples/sha384_example.fun

29 lines
632 B
Standard ML
Executable file

#!/usr/bin/env fun
/*
* This file is part of the Fun programming language.
* https://fun-lang.xyz/
*
* Copyright 2025 Johannes Findeisen <you@hanez.org>
* Licensed under the terms of the Apache-2.0 license.
* https://opensource.org/license/apache-2-0
*
* Added: 2025-10-01
*/
/*
* Example: Using SHA384 from lib/crypt/sha384.fun
*
* Expected output for "abc":
* cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
*/
#include <crypt/sha384.fun>
s = SHA384()
// Hex input representing "abc"
print(s.sha384_hex("616263"))
// Raw string input
print(s.sha384_str("abc"))