Skip to content

Commit

Permalink
Bls3 (#121)
Browse files Browse the repository at this point in the history
* Removing Wasmtime reference

* Removing Wasmtime reference
  • Loading branch information
Gekctek authored Mar 21, 2024
1 parent 1b0bedc commit 9307249
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 52 deletions.
78 changes: 39 additions & 39 deletions src/Agent/API.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions src/BLS/BlsUtil.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using Dirichlet.Numerics;
using EdjCase.ICP.BLS.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using Wasmtime;

namespace EdjCase.ICP.BLS
{
Expand Down
5 changes: 1 addition & 4 deletions src/BLS/Constants.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using Wasmtime;


namespace EdjCase.ICP.BLS
{
Expand Down
4 changes: 0 additions & 4 deletions src/BLS/EdjCase.ICP.BLS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Wasmtime" Version="8.0.1" />
</ItemGroup>

</Project>
5 changes: 5 additions & 0 deletions src/BLS/Models/G1Projective.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public bool Equals(G1Projective other)
|| (!thisIsZero && !otherIsZero && x1.Equals(x2) && y1.Equals(y2));
}

public override int GetHashCode()
{
return this.X.GetHashCode() ^ this.Y.GetHashCode() ^ this.Z.GetHashCode();
}

public G1Projective Add(G1Projective rhs)
{
Fp t0 = this.X * rhs.X;
Expand Down
5 changes: 5 additions & 0 deletions src/BLS/Models/G2Projective.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ public bool Equals(G2Projective other)
}


public override int GetHashCode()
{
return this.X.GetHashCode() ^ this.Y.GetHashCode() ^ this.Z.GetHashCode();
}

internal bool IsIdentity()
{
return this.Z.IsZero();
Expand Down
2 changes: 1 addition & 1 deletion src/BLS/Models/UInt128.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public string ToString(string format)

public string ToString(IFormatProvider provider)
{
return this.ToString(null, provider);
return this.ToString(null!, provider);
}

public string ToString(string format, IFormatProvider provider)
Expand Down

0 comments on commit 9307249

Please sign in to comment.