diff options
| author | J08nY | 2017-04-19 01:10:17 +0200 |
|---|---|---|
| committer | J08nY | 2017-04-19 01:10:17 +0200 |
| commit | a7eef06134bef0861e43261640d61153ebb2a6e5 (patch) | |
| tree | 2ef308843b4e8b1770be6681c15b98dcd78d40ff /src/cz/crcs/ectester/reader/ec/EC_Curve.java | |
| parent | f4a66768ed6dfcfd7156ad0c8c364cdbf6e45e9c (diff) | |
| download | ECTester-a7eef06134bef0861e43261640d61153ebb2a6e5.tar.gz ECTester-a7eef06134bef0861e43261640d61153ebb2a6e5.tar.zst ECTester-a7eef06134bef0861e43261640d61153ebb2a6e5.zip | |
Refactor testing, add Config class, make EC_Data read bytes
- The ECTester.Config class now stores and reads all CLI options
- Testing with the -t / --test option was partially refactored
into:
- Test:
Encapsulates one Command and Response pair with expected result,
a real result and a callback to dynamically assign result
- TestSuite:
Encapsulates a bunch of tests, represents a whole category of
tests either that can be run on any curve or only on some.
Diffstat (limited to 'src/cz/crcs/ectester/reader/ec/EC_Curve.java')
| -rw-r--r-- | src/cz/crcs/ectester/reader/ec/EC_Curve.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cz/crcs/ectester/reader/ec/EC_Curve.java b/src/cz/crcs/ectester/reader/ec/EC_Curve.java index 9b783ec..7d056a5 100644 --- a/src/cz/crcs/ectester/reader/ec/EC_Curve.java +++ b/src/cz/crcs/ectester/reader/ec/EC_Curve.java @@ -7,25 +7,27 @@ import javacard.security.KeyPair; * @author Jan Jancar johny@neuromancer.sk */ public class EC_Curve extends EC_Params { - private short bits; private byte field; private String desc; /** - * * @param bits * @param field KeyPair.ALG_EC_FP or KeyPair.ALG_EC_F2M */ public EC_Curve(short bits, byte field) { super(field == KeyPair.ALG_EC_FP ? EC_Consts.PARAMETERS_DOMAIN_FP : EC_Consts.PARAMETERS_DOMAIN_F2M); this.bits = bits; - this.field = field; } - public EC_Curve(short bits, byte field, String desc) { + public EC_Curve(String id, short bits, byte field) { this(bits, field); + this.id = id; + } + + public EC_Curve(String id, short bits, byte field, String desc) { + this(id, bits, field); this.desc = desc; } |
