File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
pg/src/main/java/org/bouncycastle/openpgp Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1414import org .bouncycastle .bcpg .Packet ;
1515import org .bouncycastle .bcpg .PacketTags ;
1616import org .bouncycastle .bcpg .PublicKeyEncSessionPacket ;
17+ import org .bouncycastle .bcpg .SymmetricEncIntegrityPacket ;
1718import org .bouncycastle .bcpg .SymmetricKeyEncSessionPacket ;
1819import org .bouncycastle .bcpg .UnsupportedPacketVersionException ;
1920import org .bouncycastle .util .Iterable ;
@@ -143,6 +144,15 @@ public PGPSessionKeyEncryptedData addSessionKeyDecryptionMethod(PGPSessionKey se
143144 return sessionKeyEncryptedData ;
144145 }
145146
147+ /** Checks whether the packet is integrity protected.
148+ *
149+ * @return <code>true</code> if there is a modification detection code package associated with
150+ * this stream
151+ */
152+ public boolean isIntegrityProtected () {
153+ return data instanceof SymmetricEncIntegrityPacket ;
154+ }
155+
146156 /**
147157 * Gets the encryption method object at the specified index.
148158 *
You can’t perform that action at this time.
0 commit comments