File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/com/microsoft/graph/core/models Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ public interface DecryptableContent {
107107 * @throws Exception if an error occurs while decrypting the data
108108 */
109109 public static @ Nonnull String decryptAsString (@ Nonnull final DecryptableContent content , @ Nonnull final CertificateKeyProvider certificateKeyProvider ) throws Exception {
110+ Objects .requireNonNull (content );
110111 Objects .requireNonNull (certificateKeyProvider );
111112 final Key privateKey = certificateKeyProvider .getCertificateKey (content .getEncryptionCertificateId (), content .getEncryptionCertificateThumbprint ());
112113 final Cipher cipher = Cipher .getInstance ("RSA/ECB/OAEPWITHSHA1ANDMGF1PADDING" );
@@ -132,6 +133,8 @@ public interface DecryptableContent {
132133 * @throws Exception if an error occurs while decrypting the data
133134 */
134135 public static @ Nonnull byte [] aesDecrypt (@ Nonnull final byte [] data , @ Nonnull final byte [] key ) throws Exception {
136+ Objects .requireNonNull (data );
137+ Objects .requireNonNull (key );
135138 try {
136139 @ SuppressWarnings ("java:S3329" )
137140 // Sonar warns that a random IV should be used for encryption
You can’t perform that action at this time.
0 commit comments