aboutsummaryrefslogtreecommitdiff
path: root/src/main/model/asn1/Tag.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/model/asn1/Tag.java')
-rw-r--r--src/main/model/asn1/Tag.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/model/asn1/Tag.java b/src/main/model/asn1/Tag.java
index 15c144f..7fb8ae4 100644
--- a/src/main/model/asn1/Tag.java
+++ b/src/main/model/asn1/Tag.java
@@ -25,9 +25,9 @@ public class Tag implements Encodable {
/**
* EFFECTS: Initialize the tag by parsing class / constructive / number from the encoded DER bytes.
- * {@link ParseException} is thrown if the input is invalid:
- * - The encoded array must have at least one byte.
- * - The tag number is zero if the class is UNIVERSAL.
+ * {@link ParseException} is thrown if the input is invalid:
+ * - The encoded array must have at least one byte.
+ * - The tag number is zero if the class is UNIVERSAL.
* REQUIRES: The highest two bits must contain the class, and then the constructive bit, and finally the low 5 bits
* must contain the tag number <= 31.
* MODIFIES: encoded (one byte read)
@@ -55,14 +55,14 @@ public class Tag implements Encodable {
if (this.cls == TagClass.UNIVERSAL && this.number == 0) {
throw new ParseException(String.format("The tag number must not be zero for UNIVERSAL tags"
- + "(byte 0x%02X @ %d)", val, encoded.getIndex()));
+ + "(byte 0x%02X @ %d)", val, encoded.getIndex()));
}
}
/**
* EFFECTS: Encode that tag as DER bytes, as follows:
* HI 7 6 | 5 | 4 3 2 1 0 LO
- * Class | C/P | Tag Number
+ * Class | C/P | Tag Number
* Notes, In the domain of this application (PKI), a single byte is always returned
* (as nothing requires high tag number). However, the return type is held as byte[]
* to 1) compliant with the spec, 2) reserve for future scalability.
@@ -79,7 +79,7 @@ public class Tag implements Encodable {
}
// Fill the high two bits with tag class
value |= cls.getVal();
- return new Byte[] { value };
+ return new Byte[]{value};
}
/**