title: Issues Working With Encrypted Zip FIles w/ Python
body: <p>I'm using a statement like:</p>
  
  <pre><code>zipf.read(file, pwd = 'password')
  </code></pre>
  
  <p>Results in an error:</p>
  
  <pre><code>TypeError: pwd: expected bytes, got str
  </code></pre>
  
  <p>Did some research, determined I should try this: </p>
  
  <pre><code>zipf.read(file, pwd = b'password')
  </code></pre>
  
  <p>Now results in error:</p>
  
  <pre><code>RuntimeError: Bad password for file &lt;ZipInfo filename='smb-d1674sc2.bin' compress_type=99 external_attr=0x20 file_size=737280 compress_size=641541&gt;
  </code></pre>
  
  <p>Feel like I am just going in circles at this point. I have also tried:</p>
  
  <pre><code>                password = 'password'
                  passwd = password.encode("UTF-8")
                  pwd = 'password'.encode('cp850','replace')
                  testpass = str(b'password', 'utf-8')
  </code></pre>
  
  <p>And none of these work either (replacing my string above with these various variables)</p>
  
  <p>Yes, I have tried opening the file on my system manually and can confirm the password is correct.</p>
  
  <p>Additional Background: Working in Lambda, taking in an encrypted zip which is uploaded to S3. My program works with no issues for zips that are not password protected.</p>