aboutsummaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common/ec/EC_KAResult.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cz/crcs/ectester/common/ec/EC_KAResult.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/cz/crcs/ectester/common/ec/EC_KAResult.java b/src/cz/crcs/ectester/common/ec/EC_KAResult.java
index a7b3cd5..8a5fcb4 100644
--- a/src/cz/crcs/ectester/common/ec/EC_KAResult.java
+++ b/src/cz/crcs/ectester/common/ec/EC_KAResult.java
@@ -8,15 +8,14 @@ import cz.crcs.ectester.common.util.CardUtil;
* @author Jan Jancar johny@neuromancer.sk
*/
public class EC_KAResult extends EC_Data {
-
- private byte ka;
+ private String ka;
private String curve;
private String oneKey;
private String otherKey;
private String desc;
- public EC_KAResult(byte ka, String curve, String oneKey, String otherKey) {
+ public EC_KAResult(String ka, String curve, String oneKey, String otherKey) {
super(1);
this.ka = ka;
this.curve = curve;
@@ -24,20 +23,24 @@ public class EC_KAResult extends EC_Data {
this.otherKey = otherKey;
}
- public EC_KAResult(String id, byte ka, String curve, String oneKey, String otherKey) {
+ public EC_KAResult(String id, String ka, String curve, String oneKey, String otherKey) {
this(ka, curve, oneKey, otherKey);
this.id = id;
}
- public EC_KAResult(String id, byte ka, String curve, String oneKey, String otherKey, String desc) {
+ public EC_KAResult(String id, String ka, String curve, String oneKey, String otherKey, String desc) {
this(id, ka, curve, oneKey, otherKey);
this.desc = desc;
}
- public byte getKA() {
+ public String getKA() {
return ka;
}
+ public byte getJavaCardKA() {
+ return CardUtil.getKA(ka);
+ }
+
public String getCurve() {
return curve;
}
@@ -56,8 +59,7 @@ public class EC_KAResult extends EC_Data {
@Override
public String toString() {
- String algo = CardUtil.getKA(ka);
- return "<" + getId() + "> " + algo + " result over " + curve + ", " + oneKey + " + " + otherKey + (desc == null ? "" : ": " + desc);
+ return "<" + getId() + "> " + ka + " result over " + curve + ", " + oneKey + " + " + otherKey + (desc == null ? "" : ": " + desc);
}
}