diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2022-05-03 15:45:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 15:45:01 +0200 |
commit | 8db6a836bd88c93b033e8671dc3ac3a5659d8411 (patch) | |
tree | 1a2ab9db922fb5ea6f99359ca80d930caff7f60c /src/main/java/org/uic/barcode/dynamicFrame/v1 | |
parent | Merge pull request #46 from UnionInternationalCheminsdeFer/1.3.1 (diff) | |
parent | version number increased (diff) | |
download | UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.gz UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.bz2 UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.lz UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.xz UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.tar.zst UIC-barcode-8db6a836bd88c93b033e8671dc3ac3a5659d8411.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/dynamicFrame/v1/DynamicFrame.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/main/java/org/uic/barcode/dynamicFrame/v1/DynamicFrame.java b/src/main/java/org/uic/barcode/dynamicFrame/v1/DynamicFrame.java index 3bfcbf5..7dbd131 100644 --- a/src/main/java/org/uic/barcode/dynamicFrame/v1/DynamicFrame.java +++ b/src/main/java/org/uic/barcode/dynamicFrame/v1/DynamicFrame.java @@ -122,44 +122,6 @@ public class DynamicFrame extends Object{ return UperEncoder.decode(bytes, DynamicFrame.class);
}
- /**
- * Sign level 2 data without a specific security provider.
- *
- * @param key the key
- * @throws Exception the exception
- */
- public void signLevel2(PrivateKey key) throws Exception {
-
- //find the algorithm name for the signature OID
- String algo = AlgorithmNameResolver.getSignatureAlgorithmName(this.getLevel2SignedData().getLevel1Data().level2SigningAlg);
- Signature sig = Signature.getInstance(algo);
- sig.initSign(key);
- byte[] data = level2SignedData.encode();
- sig.update(data);
- byte[] signature = sig.sign();
- this.level2Signature = new OctetString(signature);
-
- }
-
- /**
- * Sign level 2 data.
- *
- * @param key the key
- * @param prov the security Provider
- * @throws Exception the exception
- */
- public void signLevel2(PrivateKey key, Provider prov) throws Exception {
-
- //find the algorithm name for the signature OID
- String algo = AlgorithmNameResolver.getSignatureAlgorithmName(this.getLevel2SignedData().getLevel1Data().level2SigningAlg);
- Signature sig = Signature.getInstance(algo,prov);
- sig.initSign(key);
- byte[] data = level2SignedData.encode();
- sig.update(data);
- this.level2Signature = new OctetString(sig.sign());
-
- }
-
/**
* Adds the dynamic content and encodes it. (API level)
|