File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
pg/src/main/java/org/bouncycastle/openpgp/api Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,13 @@ public static MessageEncryptionMechanism unencrypted()
5757 SymmetricKeyAlgorithmTags .NULL , none );
5858 }
5959
60+ @ Deprecated
61+ public static MessageEncryptionMechanism legacyEncryptedNonIntegrityProtected (int symmetricKeyAlgorithm )
62+ {
63+ int none = 0 ;
64+ return new MessageEncryptionMechanism (EncryptedDataPacketType .SED , symmetricKeyAlgorithm , none );
65+ }
66+
6067 /**
6168 * The data will be encrypted and integrity protected using a SEIPDv1 packet.
6269 *
@@ -137,4 +144,15 @@ public boolean equals(Object obj)
137144 && getSymmetricKeyAlgorithm () == m .getSymmetricKeyAlgorithm ()
138145 && getAeadAlgorithm () == m .getAeadAlgorithm ();
139146 }
147+
148+ @ Override
149+ public String toString ()
150+ {
151+ String out = mode .name () + "[cipher: " + symmetricKeyAlgorithm ;
152+ if (mode == EncryptedDataPacketType .SEIPDv2 || mode == EncryptedDataPacketType .LIBREPGP_OED )
153+ {
154+ out += " aead: " + aeadAlgorithm ;
155+ }
156+ return out + "]" ;
157+ }
140158}
You can’t perform that action at this time.
0 commit comments