diff options
author | Yuuta Liang <yuutaw@students.cs.ubc.ca> | 2023-10-14 05:12:06 +0800 |
---|---|---|
committer | Yuuta Liang <yuutaw@students.cs.ubc.ca> | 2023-10-14 05:12:06 +0800 |
commit | 0bcc057e741af3fbc108f42b75f9d42f48f6a51e (patch) | |
tree | d638c81c0778554a8902efc59000e61db74060be /src/main/model/asn1/Int.java | |
parent | f369da34cf9aca151df0150d90e651e6a88ee700 (diff) | |
download | jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.tar jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.tar.gz jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.tar.bz2 jca-0bcc057e741af3fbc108f42b75f9d42f48f6a51e.zip |
Implement the CA
Signed-off-by: Yuuta Liang <yuutaw@students.cs.ubc.ca>
Diffstat (limited to 'src/main/model/asn1/Int.java')
-rw-r--r-- | src/main/model/asn1/Int.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/model/asn1/Int.java b/src/main/model/asn1/Int.java index 5b75a73..4eeeedf 100644 --- a/src/main/model/asn1/Int.java +++ b/src/main/model/asn1/Int.java @@ -25,9 +25,18 @@ public class Int extends ASN1Object { * encoding. For more information, consult {@link ASN1Object}. * REQUIRES: Consult {@link ASN1Object}. */ - public Int(Tag tag, Tag parentTag, long value) { + public Int(Tag tag, Tag parentTag, BigInteger value) { super(tag, parentTag); - this.value = BigInteger.valueOf(value); + this.value = value; + } + + /** + * EFFECTS: Initiate the INTEGER object with the given tag and an optional context-specific tag number for explicit + * encoding. For more information, consult {@link ASN1Object}. + * REQUIRES: Consult {@link ASN1Object}. + */ + public Int(Tag tag, Tag parentTag, long value) { + this(tag, parentTag, BigInteger.valueOf(value)); } /** |