Added LibreSSL as an alternative to OpenSSL. Needs more testing! (0.38.16)
This commit is contained in:
parent
d1d4adbf2c
commit
3e0d47a268
35 changed files with 677 additions and 38 deletions
28
examples/crypto/libressl_ripemd160.fun
Normal file
28
examples/crypto/libressl_ripemd160.fun
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env fun
|
||||
|
||||
/*
|
||||
* This file is part of the Fun programming language.
|
||||
* https://fun-lang.xyz/
|
||||
*
|
||||
* Copyright 2026 Johannes Findeisen <you@hanez.org>
|
||||
* Licensed under the terms of the Apache-2.0 license.
|
||||
* https://opensource.org/license/apache-2-0
|
||||
*
|
||||
* Added: 2026-02-19
|
||||
*/
|
||||
|
||||
// LibreSSL RIPEMD-160 example
|
||||
// Enable with -DFUN_WITH_LIBRESSL=ON during build for real hashing.
|
||||
|
||||
s = "abc"
|
||||
d = libressl_ripemd160(s)
|
||||
print("ripemd160(abc) = " + d)
|
||||
|
||||
// Another quick check (empty string)
|
||||
e = ""
|
||||
print("ripemd160(\"\") = " + libressl_ripemd160(e))
|
||||
|
||||
/* Expected output:
|
||||
ripemd160(abc) = 8eb208f7e05d987a9b049a9a5c0c2b74e07e6a5d
|
||||
ripemd160("") = 9c1185a5c5e9fc54612808977ee8f548b2258d31
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue