summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/uic/barcode/dynamicFrame
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-04-23 13:41:58 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2021-04-23 13:41:58 +0200
commitc45fc85b78f3d8701346a231f07b7ffa984ca4ed (patch)
tree1485df9ae1746a12409b0c17bb32d1f810875774 /src/main/java/org/uic/barcode/dynamicFrame
parentincluded open ticket test (diff)
downloadUIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.tar
UIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.tar.gz
UIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.tar.bz2
UIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.tar.lz
UIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.tar.xz
UIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.tar.zst
UIC-barcode-c45fc85b78f3d8701346a231f07b7ffa984ca4ed.zip
Diffstat (limited to 'src/main/java/org/uic/barcode/dynamicFrame')
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/Constants.java2
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java19
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java4
3 files changed, 22 insertions, 3 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/Constants.java b/src/main/java/org/uic/barcode/dynamicFrame/Constants.java
index 98b62aa..774475a 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/Constants.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/Constants.java
@@ -12,7 +12,7 @@ public class Constants {
public static String DSA_SHA1 = "1.2.840.10040.4.3";
public static String DSA_SHA224 = "2.16.840.1.101.3.4.3.1";
- public static String DSA_SHA248 = "2.16.840.1.101.3.4.3.2";
+ public static String DSA_SHA256 = "2.16.840.1.101.3.4.3.2";
public static String DATA_TYPE_FCB_VERSION_1 = "FCB1";
public static String DATA_TYPE_FCB_VERSION_2 = "FCB2";
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java b/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java
index 9605a0d..886cb79 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/DynamicFrame.java
@@ -18,6 +18,7 @@ import org.uic.barcode.asn1.datatypes.RestrictedString;
import org.uic.barcode.asn1.datatypes.Sequence;
import org.uic.barcode.asn1.datatypesimpl.OctetString;
import org.uic.barcode.asn1.uper.UperEncoder;
+import org.uic.barcode.dynamicContent.dfcb1.UicDynamicContentData1;
import org.uic.barcode.utils.AlgorithmNameResolver;
@@ -262,5 +263,23 @@ public class DynamicFrame extends Object{
}
+ public void addLevel2DynamicData(UicDynamicContentData1 dynamicData) {
+ this.getLevel2SignedData().setLevel2Data( dynamicData.getDataType());
+ }
+
+ public UicDynamicContentData1 getDynamicDataFDC1() {
+
+ if (this.getLevel2SignedData() == null ||
+ this.getLevel2SignedData().getLevel2Data() == null){
+ return null;
+ }
+
+ if ( UicDynamicContentData1.getFormat().equals(this.getLevel2SignedData().getLevel2Data().getFormat())) {
+ return UperEncoder.decode(this.getLevel2SignedData().getLevel2Data().getByteData(), UicDynamicContentData1.class);
+ }
+ return null;
+
+ }
+
}
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java b/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java
index 1f4d476..aac0188 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/Level1DataType.java
@@ -49,7 +49,7 @@ public class Level1DataType {
*
* e.g.:
* -- DSA SHA224 2.16.840.1.101.3.4.3.1
- * -- DSA SHA248 2.16.840.1.101.3.4.3.2
+ * -- DSA SHA256 2.16.840.1.101.3.4.3.2
* -- ECC 256 1.2.840.10045.3.1.7
*
*
@@ -69,7 +69,7 @@ public class Level1DataType {
*
* e.g.:
* -- DSA SHA224 2.16.840.1.101.3.4.3.1
- * -- DSA SHA248 2.16.840.1.101.3.4.3.2
+ * -- DSA SHA256 2.16.840.1.101.3.4.3.2
* -- ECC 256 1.2.840.10045.3.1.7
*
*