From aca10f3c38a70188b4caa29b1ca32b2dd04e16bc Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 10 Jul 2018 23:21:16 +0700 Subject: EC-related updates from bc-java --- .../src/math/ec/multiplier/ValidityPreCompInfo.cs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 crypto/src/math/ec/multiplier/ValidityPreCompInfo.cs (limited to 'crypto/src/math/ec/multiplier/ValidityPreCompInfo.cs') diff --git a/crypto/src/math/ec/multiplier/ValidityPreCompInfo.cs b/crypto/src/math/ec/multiplier/ValidityPreCompInfo.cs new file mode 100644 index 000000000..7ec2cbb95 --- /dev/null +++ b/crypto/src/math/ec/multiplier/ValidityPreCompInfo.cs @@ -0,0 +1,44 @@ +using System; + +namespace Org.BouncyCastle.Math.EC.Multiplier +{ + internal class ValidityPreCompInfo + : PreCompInfo + { + internal static readonly string PRECOMP_NAME = "bc_validity"; + + private bool failed = false; + private bool curveEquationPassed = false; + private bool orderPassed = false; + + internal bool HasFailed() + { + return failed; + } + + internal void ReportFailed() + { + failed = true; + } + + internal bool HasCurveEquationPassed() + { + return curveEquationPassed; + } + + internal void ReportCurveEquationPassed() + { + curveEquationPassed = true; + } + + internal bool HasOrderPassed() + { + return orderPassed; + } + + internal void ReportOrderPassed() + { + orderPassed = true; + } + } +} -- cgit 1.5.1