summaryrefslogtreecommitdiffstats
path: root/src/org/uic/header/DynamicHeader.java
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2020-07-28 17:57:25 +0200
committerCGantert345 <57003061+CGantert345@users.noreply.github.com>2020-07-28 17:57:25 +0200
commitb17ce13cc31abd088088bf8ab26cc924a6a36585 (patch)
tree5588e1ccc212213097500f4cb43fa0e3e68e323b /src/org/uic/header/DynamicHeader.java
parentDraft of the new DOSIPAS included (diff)
downloadUIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.tar
UIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.tar.gz
UIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.tar.bz2
UIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.tar.lz
UIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.tar.xz
UIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.tar.zst
UIC-barcode-b17ce13cc31abd088088bf8ab26cc924a6a36585.zip
Diffstat (limited to 'src/org/uic/header/DynamicHeader.java')
-rw-r--r--src/org/uic/header/DynamicHeader.java259
1 files changed, 0 insertions, 259 deletions
diff --git a/src/org/uic/header/DynamicHeader.java b/src/org/uic/header/DynamicHeader.java
deleted file mode 100644
index 220e7f2..0000000
--- a/src/org/uic/header/DynamicHeader.java
+++ /dev/null
@@ -1,259 +0,0 @@
-package org.uic.header;
-
-import org.uic.ticket.api.EncodingFormatException;
-import org.uic.ticket.api.utils.UicEncoderUtils;
-
-import net.gcdc.asn1.datatypes.Asn1Optional;
-import net.gcdc.asn1.datatypes.CharacterRestriction;
-import net.gcdc.asn1.datatypes.HasExtensionMarker;
-import net.gcdc.asn1.datatypes.IntRange;
-import net.gcdc.asn1.datatypes.RestrictedString;
-import net.gcdc.asn1.datatypes.Sequence;
-import net.gcdc.asn1.datatypesimpl.OctetString;
-import net.gcdc.asn1.uper.UperEncoder;
-
-
-// TODO: Auto-generated Javadoc
-/**
- * The DynamicHeader for bar codes
- *
- * Implementation of the Draft under discussion, not final.
- */
-@Sequence
-@HasExtensionMarker
-public class DynamicHeader {
-
-
- /** The format. */
- @RestrictedString(CharacterRestriction.IA5String)
- public String format;
-
- /** The vesion. */
- @IntRange(minValue=1,maxValue=16)
- public Long version;
-
-
- /**
- * The security provider
- * numeric codes 1 ...32000
- *
- * */
- @IntRange(minValue=1,maxValue=32000)
- @Asn1Optional public Long securityProviderNum;
-
- /** The security provider alphanumeric codes. */
- @RestrictedString(CharacterRestriction.IA5String)
- @Asn1Optional public String securityProviderIA5;
-
-
- /** The static data. */
- public SignedDataType staticData;
-
- /** The dynamic data. */
- @Asn1Optional public SignedDataType dynamicData;
-
- /** The dynamic public key. */
- @Asn1Optional public OctetString dynamicPublicKey;
-
- /** The extension. */
- @Asn1Optional public Extension extension;
-
- /**
- * Gets the format.
- *
- * @return the format
- */
- public String getFormat() {
- return format;
- }
-
- /**
- * Sets the format.
- *
- * @param format the new format
- */
- public void setFormat(String format) {
- this.format = format;
- }
-
- /**
- * Gets the version.
- *
- * @return the version
- */
- public Long getVersion() {
- return version;
- }
-
- /**
- * Sets the version.
- *
- * @param version the new version
- */
- public void setVersion(Long version) {
- this.version = version;
- }
-
- /**
- * Gets the security provider num.
- *
- * @return the security provider num
- */
- public Long getSecurityProviderNum() {
- return securityProviderNum;
- }
-
- /**
- * Sets the security provider num.
- *
- * in case the security provider code is encoded in IA5 this will return null
- *
- * @param securityProviderNum the new security provider num
- */
- public void setSecurityProviderNum(Long securityProviderNum) {
- this.securityProviderNum = securityProviderNum;
- }
-
- /**
- * Gets the security provider IA5.
- *
- * in case the security provider code is encoded numerically this will return null
- *
- * @return the security provider IA5
- */
- public String getSecurityProviderIA5() {
- return securityProviderIA5;
- }
-
- /**
- * Sets the security provider
- *
- * The security provider code must use the IA5 Alphabet .
- *
- * @param securityProvider the new security provider
- * @throws EncodingFormatException the encoding format exception
- */
- public void setSecurityProvider(String securityProvider) throws EncodingFormatException {
- this.securityProviderNum = UicEncoderUtils.getNum(securityProvider);
- this.securityProviderIA5 = UicEncoderUtils.getIA5NonNum(securityProvider);
- }
-
-
- /**
- * Gets the security provider.
- *
- * @return the security provider
- */
- public String getSecurityProvider() {
- return UicEncoderUtils.mapToString(this.securityProviderNum, this.securityProviderIA5);
- }
-
-
- /**
- * Sets the security provider IA 5.
- *
- * @param securityProviderIA5 the new security provider IA 5
- */
- public void setSecurityProviderIA5(String securityProviderIA5) {
- this.securityProviderIA5 = securityProviderIA5;
- }
-
- /**
- * Gets the static data.
- *
- * @return the static data
- */
- public SignedDataType getStaticData() {
- return staticData;
- }
-
- /**
- * Sets the static data.
- *
- * @param staticData the new static data
- */
- public void setStaticData(SignedDataType staticData) {
- this.staticData = staticData;
- }
-
- /**
- * Gets the dynamic data.
- *
- * @return the dynamic data
- */
- public SignedDataType getDynamicData() {
- return dynamicData;
- }
-
- /**
- * Sets the dynamic data.
- *
- * @param dynamicData the new dynamic data
- */
- public void setDynamicData(SignedDataType dynamicData) {
- this.dynamicData = dynamicData;
- }
-
- /**
- * Gets the dynamic public key.
- *
- * @return the dynamic public key
- */
- public OctetString getDynamicPublicKey() {
- return dynamicPublicKey;
- }
-
- /**
- * Sets the dynamic public key.
- *
- * @param dynamicPublicKey the new dynamic public key
- */
- public void setDynamicPublicKey(OctetString dynamicPublicKey) {
- this.dynamicPublicKey = dynamicPublicKey;
- }
-
- /**
- * Gets the extension.
- *
- * @return the extension
- */
- public Extension getExtension() {
- return extension;
- }
-
- /**
- * Sets the extension.
- *
- * @param extension the new extension
- */
- public void setExtension(Extension extension) {
- this.extension = extension;
- }
-
-
- /**
- * Encode.
- *
- * Encode the header as ASN.1 PER UNALIGNED byte array
- *
- * @return the byte[]
- */
- public byte[] encode() {
- return UperEncoder.encode(this);
- }
-
- /**
- * Decode.
- *
- * Decode the header from an ASN.1 PER UNALIGNED encoded byte array
- *
- * @param bytes the bytes
- * @return the dynamic header
- */
- public static DynamicHeader decode(byte[] bytes) {
- return UperEncoder.decode(bytes, DynamicHeader.class);
- }
-
-
-
-}