summaryrefslogtreecommitdiff
path: root/src/cz/crcs/ectester/common/ec/EC_Keypair.java
blob: 53632cde72d4f0fe6c039b9a6ee8b67ba03439e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package cz.crcs.ectester.common.ec;

import cz.crcs.ectester.applet.EC_Consts;

/**
 * An EC keypair, contains both the W and S parameters.
 *
 * @author Jan Jancar johny@neuromancer.sk
 */
public class EC_Keypair extends EC_Params {
    private String curve;
    private String desc;

    public EC_Keypair(String curve) {
        super(EC_Consts.PARAMETERS_KEYPAIR);
        this.curve = curve;
    }

    public EC_Keypair(String curve, String desc) {
        this(curve);
        this.desc = desc;
    }

    public EC_Keypair(String id, String curve, String desc) {
        this(curve, desc);
        this.id = id;
    }

    public String getCurve() {
        return curve;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return "<" + getId() + "> EC Keypair, over " + curve + (desc == null ? "" : ": " + desc);
    }
}