|
50 | 50 | import org.bouncycastle.openpgp.PGPSignature; |
51 | 51 | import org.bouncycastle.openpgp.bc.BcPGPObjectFactory; |
52 | 52 | import org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory; |
| 53 | +import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor; |
53 | 54 | import org.bouncycastle.openpgp.operator.PGPContentVerifier; |
54 | 55 | import org.bouncycastle.openpgp.operator.PGPDigestCalculator; |
55 | 56 | import org.bouncycastle.openpgp.operator.PGPDigestCalculatorProvider; |
56 | 57 | import org.bouncycastle.openpgp.operator.bc.BcKeyFingerprintCalculator; |
| 58 | +import org.bouncycastle.openpgp.operator.bc.BcPBESecretKeyDecryptorBuilder; |
57 | 59 | import org.bouncycastle.openpgp.operator.bc.BcPGPContentVerifierBuilderProvider; |
58 | 60 | import org.bouncycastle.openpgp.operator.bc.BcPGPDataEncryptorBuilder; |
59 | 61 | import org.bouncycastle.openpgp.operator.bc.BcPGPDigestCalculatorProvider; |
@@ -101,9 +103,9 @@ public void performTest() |
101 | 103 | testX25519HKDF(); |
102 | 104 | testKeyRings(); |
103 | 105 | testBcPGPKeyPair(); |
104 | | -// testBcPGPDataEncryptorBuilder(); |
| 106 | + testBcPGPDataEncryptorBuilder(); |
105 | 107 | testBcPGPContentVerifierBuilderProvider(); |
106 | | - //testBcPBESecretKeyDecryptorBuilder(); |
| 108 | + testBcPBESecretKeyDecryptorBuilder(); |
107 | 109 | testBcKeyFingerprintCalculator(); |
108 | 110 | testBcStandardDigests(); |
109 | 111 | } |
@@ -179,12 +181,12 @@ public void operation() |
179 | 181 | }); |
180 | 182 | } |
181 | 183 |
|
182 | | -// public void testBcPBESecretKeyDecryptorBuilder() |
183 | | -// throws PGPException |
184 | | -// { |
185 | | -// final PBESecretKeyDecryptor decryptor = new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(BcPGPDSAElGamalTest.pass); |
186 | | -// decryptor.recoverKeyData(SymmetricKeyAlgorithmTags.CAMELLIA_256, new byte[32], new byte[12], new byte[16], 0, 16); |
187 | | -// } |
| 184 | + public void testBcPBESecretKeyDecryptorBuilder() |
| 185 | + throws PGPException |
| 186 | + { |
| 187 | + final PBESecretKeyDecryptor decryptor = new BcPBESecretKeyDecryptorBuilder(new BcPGPDigestCalculatorProvider()).build(BcPGPDSAElGamalTest.pass); |
| 188 | + decryptor.recoverKeyData(SymmetricKeyAlgorithmTags.CAMELLIA_256, new byte[32], new byte[12], new byte[16], 0, 16); |
| 189 | + } |
188 | 190 |
|
189 | 191 | public void testBcPGPContentVerifierBuilderProvider() |
190 | 192 | throws Exception |
|
0 commit comments