Compiler crash when compiling c code in a library without --obj-out #1503.

This commit is contained in:
Christoffer Lerno
2024-10-03 00:56:01 +02:00
parent 131a783e89
commit 1b8f8c5f5a
3 changed files with 15 additions and 2 deletions

12
lib/std/crypto/dh.c3 Normal file
View File

@@ -0,0 +1,12 @@
module std::crypto::dh;
import std::math::bigint;
fn BigInt generate_secret(BigInt p, BigInt x, BigInt y)
{
return y.mod_pow(x, p);
}
fn BigInt public_key(BigInt p, BigInt g, BigInt x)
{
return g.mod_pow(x, p);
}