Configuration and Auto-Certificates
[aaf/authz.git] / cadi / core / src / main / java / org / onap / aaf / cadi / Symm.java
index 4067f16..04743b8 100644 (file)
@@ -662,6 +662,9 @@ public class Symm {
    * @throws IOException
    */
   public void enpass(final String password, final OutputStream os) throws IOException {
+           if(password==null) {
+               throw new IOException("Invalid password passed");
+           }
                final ByteArrayOutputStream baos = new ByteArrayOutputStream();
                DataOutputStream dos = new DataOutputStream(baos);
                byte[] bytes = password.getBytes();