diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2024-11-15 14:48:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 14:48:14 +0100 |
commit | 15c13a22610ad6e705b38e66ce3599b1ebe78df7 (patch) | |
tree | c4e9449567b776145b5c971224f9233d3e7cc42f /src/main/java/org/uic/barcode/dynamicFrame/api | |
parent | Merge pull request #89 from UnionInternationalCheminsdeFer/fix_SSB_class_codes (diff) | |
parent | Merge branch 'master' into feature/upgrade-pom-version-to-match-tag-1.4.8 (diff) | |
download | UIC-barcode-master.tar UIC-barcode-master.tar.gz UIC-barcode-master.tar.bz2 UIC-barcode-master.tar.lz UIC-barcode-master.tar.xz UIC-barcode-master.tar.zst UIC-barcode-master.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicFrame/api/SimpleDynamicFrame.java | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/api/SimpleDynamicFrame.java b/src/main/java/org/uic/barcode/dynamicFrame/api/SimpleDynamicFrame.java index 15f169b..7517880 100644 --- a/src/main/java/org/uic/barcode/dynamicFrame/api/SimpleDynamicFrame.java +++ b/src/main/java/org/uic/barcode/dynamicFrame/api/SimpleDynamicFrame.java @@ -115,8 +115,8 @@ public class SimpleDynamicFrame implements IDynamicFrame { /**
* Verify the level 2 signature
- *
- * Note: an appropriate security provider (e.g. BC) must be registered before
+ * <p>
+ * Note: an appropriate security provider (e.g. BC) must be registered before
*
* @return the int
* @throws EncodingFormatException
@@ -129,10 +129,10 @@ public class SimpleDynamicFrame implements IDynamicFrame { /**
* Verify the level 2 signature
- *
- * Note: an appropriate security provider (e.g. BC) must be registered before
+ * <p>
+ * Note: an appropriate security provider (e.g. BC) must be registered before
*
- * @param provider the registered security provider
+ * @param prov the registered security provider
* @return the return error code
* @throws EncodingFormatException
*/
@@ -144,7 +144,7 @@ public class SimpleDynamicFrame implements IDynamicFrame { if (getLevel2Data() == null
|| getLevel2Data().getLevel1Data() == null
|| getLevel2Data().getLevel1Data().getLevel2KeyAlg() == null
- || getLevel2Data().getLevel1Data().getLevel2KeyAlg().length() == 0) {
+ || getLevel2Data().getLevel1Data().getLevel2KeyAlg().isEmpty()) {
return Constants.LEVEL2_VALIDATION_NO_KEY;
}
@@ -152,7 +152,7 @@ public class SimpleDynamicFrame implements IDynamicFrame { String level2SigAlg = this.getLevel2Data().getLevel1Data().getLevel2SigningAlg();
- if (level2KeyAlg == null || level2KeyAlg.length() == 0) {
+ if (level2KeyAlg == null || level2KeyAlg.isEmpty()) {
return Constants.LEVEL2_VALIDATION_NO_KEY;
}
@@ -166,7 +166,7 @@ public class SimpleDynamicFrame implements IDynamicFrame { } catch (Exception e1) {
return Constants.LEVEL2_VALIDATION_KEY_ALG_NOT_IMPLEMENTED;
}
- if (keyAlgName == null || keyAlgName.length() == 0) {
+ if (keyAlgName == null || keyAlgName.isEmpty()) {
return Constants.LEVEL2_VALIDATION_KEY_ALG_NOT_IMPLEMENTED;
}
@@ -260,7 +260,6 @@ public class SimpleDynamicFrame implements IDynamicFrame { if (getLevel2Data() == null
|| getLevel2Data().getLevel1Signature() == null
- || getLevel2Data().getLevel1Signature() == null
|| getLevel2Data().getLevel1Signature().length == 0) {
return Constants.LEVEL1_VALIDATION_NO_SIGNATURE;
}
@@ -274,13 +273,13 @@ public class SimpleDynamicFrame implements IDynamicFrame { if (getLevel2Data() != null
&& getLevel2Data().getLevel1Data() != null
&& getLevel2Data().getLevel1Data().getLevel1SigningAlg() != null
- && getLevel2Data().getLevel1Data().getLevel1SigningAlg().length() > 0) {
+ && !getLevel2Data().getLevel1Data().getLevel1SigningAlg().isEmpty()) {
signingAlgorithmOid = getLevel2Data().getLevel1Data().getLevel1SigningAlg();
} else {
signingAlgorithmOid = signatureAlgorithmOid;
}
- if (signingAlgorithmOid == null || signingAlgorithmOid.length() == 0) {
+ if (signingAlgorithmOid == null || signingAlgorithmOid.isEmpty()) {
return Constants.LEVEL1_VALIDATION_NO_SIGNATURE;
}
@@ -426,12 +425,10 @@ public class SimpleDynamicFrame implements IDynamicFrame { /**
* Sign the contained data block.
- *
- * Note: an appropriate security provider (e.g. BC) must be registered before
+ * <p>
+ * Note: an appropriate security provider (e.g. BC) must be registered before
*
* @param key the key
- * @return
- * @return the byte[]
* @throws Exception
*/
@Override
@@ -443,13 +440,11 @@ public class SimpleDynamicFrame implements IDynamicFrame { /**
* Sign the contained data block.
- *
- * Note: an appropriate security provider (e.g. BC) must be registered before
+ * <p>
+ * Note: an appropriate security provider (e.g. BC) must be registered before
*
* @param key the key
- * @param security provider - security provider that must be sued to create the signature
- * @return
- * @return the byte[]
+ * @param prov provider - security provider that must be sued to create the signature
* @throws Exception
*/
@Override
|