diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2021-12-14 17:14:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 17:14:28 +0100 |
commit | ceb8f4b90b3291008137554170693515a0670313 (patch) | |
tree | 5403dd4495019f9e3f13b2797d95430ec7701025 /src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java | |
parent | Merge pull request #40 from UnionInternationalCheminsdeFer/1.2.12 (diff) | |
parent | uodate of version number (diff) | |
download | UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.tar UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.tar.gz UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.tar.bz2 UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.tar.lz UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.tar.xz UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.tar.zst UIC-barcode-ceb8f4b90b3291008137554170693515a0670313.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java b/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java index c658448..e8f3695 100644 --- a/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java +++ b/src/main/java/org/uic/barcode/dynamicContent/fdc1/UicDynamicContentDataFDC1.java @@ -51,6 +51,7 @@ public class UicDynamicContentDataFDC1 { //dynamicContentGeoCoordinate GeoCoordinateType OPTIONAL,
@FieldOrder(order = 2)
@Asn1Optional public GeoCoordinateType geoCoordinate;
+
//-- Response from the mobile to any data received from the terminal.
//-- The data received from the terminal may be a random number, or any other information.
//-- The response may be the data itself, a hashing of this data, or any other response.
@@ -60,11 +61,12 @@ public class UicDynamicContentDataFDC1 { // -- * "=" if the data included in extensionData is exactly the one that was transmitted by the terminal,
// -- * any other value (chosen by the issuer) in other cases.
/** The challenge response. */
-
@FieldOrder(order = 3)
- @Asn1Optional public SequenceOfExtension extensions;
+ @Asn1Optional public SequenceOfExtension dynamicContentResponseToChallenge;
+ @FieldOrder(order = 4)
+ @Asn1Optional public ExtensionData dynamicContentExtension;
//...
@@ -100,8 +102,8 @@ public class UicDynamicContentDataFDC1 { }
public String getChallengeString() {
- if (this.extensions != null) {
- for (ExtensionData ed : extensions) {
+ if (this.dynamicContentResponseToChallenge != null) {
+ for (ExtensionData ed : dynamicContentResponseToChallenge) {
if (ed.getExtensionId().equals("=")) {
byte[] c = ed.getExtensionData();
try {
@@ -116,8 +118,8 @@ public class UicDynamicContentDataFDC1 { }
public void setChallengeString(String challengeString) {
- if (extensions == null) {
- extensions = new SequenceOfExtension();
+ if (dynamicContentResponseToChallenge == null) {
+ dynamicContentResponseToChallenge = new SequenceOfExtension();
};
ExtensionData ed = new ExtensionData();
ed.setExtensionId("=");
@@ -126,12 +128,12 @@ public class UicDynamicContentDataFDC1 { } catch (UnsupportedEncodingException e) {
return;
}
- extensions.add(ed);
+ dynamicContentResponseToChallenge.add(ed);
}
public byte[] getPhoneIdHash() {
- if (this.extensions != null) {
- for (ExtensionData ed : extensions) {
+ if (this.dynamicContentResponseToChallenge != null) {
+ for (ExtensionData ed : dynamicContentResponseToChallenge) {
if (ed.getExtensionId().equals("phone")) {
return ed.getExtensionData();
}
@@ -141,18 +143,18 @@ public class UicDynamicContentDataFDC1 { }
public void setPhoneIdHash(byte[] phoneIdHash) {
- if (extensions == null) {
- extensions = new SequenceOfExtension();
+ if (dynamicContentResponseToChallenge == null) {
+ dynamicContentResponseToChallenge = new SequenceOfExtension();
};
ExtensionData ed = new ExtensionData();
ed.setExtensionId("phone");
ed.setExtensionData(phoneIdHash);
- extensions.add(ed);
+ dynamicContentResponseToChallenge.add(ed);
}
public byte[] getPassIdHash() {
- if (this.extensions != null) {
- for (ExtensionData ed : extensions) {
+ if (this.dynamicContentResponseToChallenge != null) {
+ for (ExtensionData ed : dynamicContentResponseToChallenge) {
if (ed.getExtensionId().equals("pass")) {
return ed.getExtensionData();
}
@@ -162,13 +164,13 @@ public class UicDynamicContentDataFDC1 { }
public void setPassIdHash(byte[] passIdHash) {
- if (extensions == null) {
- extensions = new SequenceOfExtension();
+ if (dynamicContentResponseToChallenge == null) {
+ dynamicContentResponseToChallenge = new SequenceOfExtension();
};
ExtensionData ed = new ExtensionData();
ed.setExtensionId("pass");
ed.setExtensionData(passIdHash);
- extensions.add(ed);
+ dynamicContentResponseToChallenge.add(ed);
}
public TimeStamp getTimeStamp() {
@@ -180,11 +182,11 @@ public class UicDynamicContentDataFDC1 { }
public SequenceOfExtension getExtensions() {
- return extensions;
+ return dynamicContentResponseToChallenge;
}
public void setExtensions(SequenceOfExtension extensions) {
- this.extensions = extensions;
+ this.dynamicContentResponseToChallenge = extensions;
}
public byte[] encode() {
@@ -199,6 +201,14 @@ public class UicDynamicContentDataFDC1 { this.appId = appId;
}
+ public ExtensionData getDynamicContentExtension() {
+ return dynamicContentExtension;
+ }
+
+ public void setDynamicContentExtension(ExtensionData dynamicContentExtension) {
+ this.dynamicContentExtension = dynamicContentExtension;
+ }
+
}
|