Fun
0.41.5
The programming language that makes You have fun
Main Page
Data Structures
Files
File List
Globals
Loading...
Searching...
No Matches
src
vm
openssl
md5.c
Go to the documentation of this file.
1
/*
2
* This file is part of the Fun programming language.
3
* https://fun-lang.xyz/
4
*
5
* Copyright 2026 Johannes Findeisen <you@hanez.org>
6
* Licensed under the terms of the Apache-2.0 license.
7
* https://opensource.org/license/apache-2-0
8
*/
9
30
31
case
OP_OPENSSL_MD5
: {
32
Value
vdata = pop_value(vm);
33
char
*
s
=
value_to_string_alloc
(&vdata);
34
free_value
(vdata);
35
if
(!
s
) {
36
push_value
(vm,
make_string
(
""
));
37
break
;
38
}
39
char
*
hex
= fun_openssl_md5_hex((
const
unsigned
char
*)
s
, strlen(
s
));
40
free
(
s
);
41
if
(!
hex
) {
42
push_value
(vm,
make_string
(
""
));
43
break
;
44
}
45
Value
out
=
make_string
(
hex
);
46
free
(
hex
);
47
push_value
(vm,
out
);
48
break
;
49
}
out
Value out
Definition
apop.c:38
OP_OPENSSL_MD5
@ OP_OPENSSL_MD5
Definition
bytecode.h:197
free_value
free_value(vdata)
free
free(s)
push_value
push_value(vm, out)
hex
char * hex
Definition
md5.c:39
s
uint32_t s
Definition
rol.c:31
Value
Tagged union representing a Fun value.
Definition
value.h:68
make_string
Value make_string(const char *s)
Construct a string Value by duplicating the given C string.
Definition
value.c:95
value_to_string_alloc
char * value_to_string_alloc(const Value *v)
Allocate a printable C string for a Value.
Definition
value.c:641
Generated on
for Fun by
1.16.1