1
0
Fork 0
forked from fun/fun

Added sha384.fun to std library and alot of fixes. (0.16.3)

This commit is contained in:
Johannes Findeisen 2025-10-01 19:08:08 +02:00
commit 17241b2401
18 changed files with 820 additions and 314 deletions

29
examples/sha384_example.fun Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env fun
/*
* This file is part of the Fun programming language.
* https://hanez.org/project/fun/
*
* 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"))