From b17ce13cc31abd088088bf8ab26cc924a6a36585 Mon Sep 17 00:00:00 2001 From: CGantert345 <57003061+CGantert345@users.noreply.github.com> Date: Tue, 28 Jul 2020 17:57:25 +0200 Subject: Draft of the new DOSIPAS included --- src/org/uic/header/DataBlockType.java | 129 ---------------------------------- 1 file changed, 129 deletions(-) delete mode 100644 src/org/uic/header/DataBlockType.java (limited to 'src/org/uic/header/DataBlockType.java') diff --git a/src/org/uic/header/DataBlockType.java b/src/org/uic/header/DataBlockType.java deleted file mode 100644 index 503c203..0000000 --- a/src/org/uic/header/DataBlockType.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.uic.header; - -import net.gcdc.asn1.datatypes.Asn1Optional; -import net.gcdc.asn1.datatypes.CharacterRestriction; -import net.gcdc.asn1.datatypes.IntRange; -import net.gcdc.asn1.datatypes.RestrictedString; -import net.gcdc.asn1.datatypes.Sequence; -import net.gcdc.asn1.uper.UperEncoder; - - -/** - * The DataBlockType. - * - * Data block ready for signing - * - */ -@Sequence -public class DataBlockType { - - - /** The data. */ - public SequenceOfDataType data; - - /** - * The signing algorithm - * Object Identifier of the Algorithm - * Number notation: - * - * e.g.: - * -- DSA SHA224 2.16.840.1.101.3.4.3.1 - * -- DSA SHA248 2.16.840.1.101.3.4.3.2 - * -- ECC 1.2.840.10045.3.1.7 - * - * - */ - @RestrictedString(CharacterRestriction.ObjectIdentifier) - @Asn1Optional public String signingAlg; - - /** The key id. */ - @IntRange(minValue=1,maxValue=1024) - @Asn1Optional public Long keyId; - - /** - * Gets the data. - * - * @return the data - */ - public SequenceOfDataType getData() { - return data; - } - - /** - * Sets the data. - * - * @param data the new data - */ - public void setData(SequenceOfDataType data) { - this.data = data; - } - - /** - * Gets the signing algorithm - * - * Object Identifier of algorithm Algorithm - * Number notation: - * - * e.g.: - * -- DSA SHA224 2.16.840.1.101.3.4.3.1 - * -- DSA SHA248 2.16.840.1.101.3.4.3.2 - * -- ECC 1.2.840.10045.3.1.7 - * - * @return the signing alg - */ - public String getSigningAlg() { - return signingAlg; - } - - /** - * Sets the signing algorithm - * - * Object Identifier of the Algorithm - * Number notation: - * - * e.g.: - * -- DSA SHA224 2.16.840.1.101.3.4.3.1 - * -- DSA SHA248 2.16.840.1.101.3.4.3.2 - * -- ECC 1.2.840.10045.3.1.7 - * - * @param signingAlgorithm the new signing alg - */ - public void setSigningAlg(String signingAlgorithm) { - this.signingAlg = signingAlgorithm; - } - - /** - * Gets the key id. - * - * @return the key id - */ - public Long getKeyId() { - return keyId; - } - - /** - * Sets the key id. - * - * @param keyId the new key id - */ - public void setKeyId(Long keyId) { - this.keyId = keyId; - } - - - /** - * Gets the data for signature. - * - * The byte array containing the ASN.1 PER UNALIGNED encoded data of the DataBlock - * - * - * @return the data for signature - */ - public byte[] getDataForSignature() { - return UperEncoder.encode(this); - - } - - - -} -- cgit v1.2.3