herumi / mcl

a portable and fast pairing-based cryptography library
BSD 3-Clause "New" or "Revised" License
452 stars 152 forks source link

An error happened in C sharp project. #58

Closed scanf123 closed 5 years ago

scanf123 commented 5 years ago

Hi, all. When I run the C sharp solution in Visual stuido 2017, an error happens in 'bn256.cs' file.

public static void init()
        {
            const int curveFp254BNb = 0;
            const int maxUnitSize = 4;
            if (mclBn_init(curveFp254BNb, maxUnitSize) != 0) { // the value is -4404.
                throw new InvalidOperationException("mclBn_init");
            }
        }

Is any BUGs in the current version ?

herumi commented 5 years ago

I'm sorry that the C# sample code was old. I'll rewrite them later, but I have fixed it now https://github.com/herumi/mcl/commit/dd21a776c6bf1410352ade3f35c6426d6a2ff1ad .