summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorCGantert345 <57003061+CGantert345@users.noreply.github.com>2023-11-30 10:37:58 +0100
committerGitHub <noreply@github.com>2023-11-30 10:37:58 +0100
commiteb27ea529f109a495b2b156469dff8869a93df14 (patch)
tree195597b3d63620a43d6103790a11933005210c0b /src/main
parentMerge pull request #74 from UnionInternationalCheminsdeFer/1.4.5 (diff)
parentdeprecated function without dedicated security provider (diff)
downloadUIC-barcode-1.4.5.tar
UIC-barcode-1.4.5.tar.gz
UIC-barcode-1.4.5.tar.bz2
UIC-barcode-1.4.5.tar.lz
UIC-barcode-1.4.5.tar.xz
UIC-barcode-1.4.5.tar.zst
UIC-barcode-1.4.5.zip
Diffstat (limited to '')
-rw-r--r--src/main/java/org/uic/barcode/Decoder.java3
-rw-r--r--src/main/java/org/uic/barcode/Encoder.java2
-rw-r--r--src/main/java/org/uic/barcode/dynamicFrame/api/DynamicFrameCoder.java8
3 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/org/uic/barcode/Decoder.java b/src/main/java/org/uic/barcode/Decoder.java
index 637bbf6..0878d8d 100644
--- a/src/main/java/org/uic/barcode/Decoder.java
+++ b/src/main/java/org/uic/barcode/Decoder.java
@@ -82,6 +82,7 @@ public class Decoder {
* @throws UnsupportedOperationException the unsupported operation exception
* @throws IOException Signals that an I/O exception has occurred.
* @throws EncodingFormatException the encoding format exception
+ * @deprecated
*/
public int validateLevel1(PublicKey key) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException, IllegalArgumentException, UnsupportedOperationException, IOException, EncodingFormatException {
if (dynamicFrame != null) {
@@ -115,6 +116,7 @@ public class Decoder {
* @throws UnsupportedOperationException the unsupported operation exception
* @throws IOException Signals that an I/O exception has occurred.
* @throws EncodingFormatException the encoding format exception
+ * @deprecated
*/
public int validateLevel1(PublicKey key, String signingAlg) throws InvalidKeyException, NoSuchAlgorithmException, SignatureException, IllegalArgumentException, UnsupportedOperationException, IOException, EncodingFormatException {
if (dynamicFrame != null ) {
@@ -177,6 +179,7 @@ public class Decoder {
*
* @return the return code indicating errors
* @throws EncodingFormatException
+ * @deprecated
*/
public int validateLevel2() throws EncodingFormatException {
if (!isStaticHeader(data) && dynamicFrame != null) {
diff --git a/src/main/java/org/uic/barcode/Encoder.java b/src/main/java/org/uic/barcode/Encoder.java
index f8dae02..3eb2faf 100644
--- a/src/main/java/org/uic/barcode/Encoder.java
+++ b/src/main/java/org/uic/barcode/Encoder.java
@@ -234,6 +234,7 @@ public class Encoder {
*
* @param key the key
* @throws Exception the exception
+ * @deprecated
*/
public void signLevel2(PrivateKey key) throws Exception {
if (dynamicFrame != null) {
@@ -367,6 +368,7 @@ public class Encoder {
* @param signingAlg the signing algorithm (OID)
* @param keyId the key id
* @throws Exception the exception
+ * @deprecated
*/
public void signLevel1(String securityProvider,PrivateKey key,String signingAlg, String keyId) throws Exception {
if (dynamicFrame != null) {
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/api/DynamicFrameCoder.java b/src/main/java/org/uic/barcode/dynamicFrame/api/DynamicFrameCoder.java
index 53efb3e..091cd4c 100644
--- a/src/main/java/org/uic/barcode/dynamicFrame/api/DynamicFrameCoder.java
+++ b/src/main/java/org/uic/barcode/dynamicFrame/api/DynamicFrameCoder.java
@@ -49,10 +49,10 @@ public class DynamicFrameCoder {
if (frame.getFormat() != null && frame.getFormat().equals(Constants.DYNAMIC_BARCODE_FORMAT_VERSION_1)) {
return frame;
- }
- } catch(Exception e1) {
+ }
+ } catch (Throwable e) {
frame = null;
- // failed, try next
+ // failed, try next
}
frame = new SimpleDynamicFrame();
@@ -62,7 +62,7 @@ public class DynamicFrameCoder {
if (frame.getFormat() != null && frame.getFormat().equals(Constants.DYNAMIC_BARCODE_FORMAT_VERSION_2)) {
return frame;
}
- } catch(Exception e1) {
+ } catch(Throwable e) {
throw new EncodingFormatException("Dynamic Header Version not supported");
// failed
}