mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-20 17:33:08 +00:00
git subtree add --squash --prefix libsodium git@github.com:jedisct1/libsodium.git 1.0.13 git commit --amend (to rewrite this commit message)
28 lines
563 B
Plaintext
28 lines
563 B
Plaintext
TEST_PROGRAM='using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
static class Program
|
|
{
|
|
[DllImport("libsodium")]
|
|
static extern int sodium_init();
|
|
|
|
static int Main()
|
|
{
|
|
int error = sodium_init();
|
|
Console.WriteLine(error == 0
|
|
? "ok"
|
|
: "error: sodium_init() returned {0}", error);
|
|
return error == 0 ? 0 : 1;
|
|
}
|
|
}
|
|
'
|
|
|
|
dotnet --info
|
|
cd ~
|
|
dotnet new console --name Test
|
|
cd Test
|
|
echo "$TEST_PROGRAM" > Program.cs
|
|
dotnet add package libsodium --version $1 --source /io/packages
|
|
dotnet restore
|
|
dotnet run
|