擅长:python、mysql、java
<ol>
<li>不要使用密码短语的直接哈希,而是使用(或创建)一个<a href="http://en.wikipedia.org/wiki/Key_derivation_function" rel="nofollow noreferrer">KDF</a></li>
<li>你肯定是<a href="https://stackoverflow.com/questions/65879/should-i-use-an-initialization-vector-iv-along-with-my-encryption">should use IV</a>。您可以将其存储为文件的第一个块。在</li>
<li>我个人可能会用AES_模式.CTR-请参见这个老问题的<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Counter_.28CTR.29" rel="nofollow noreferrer">Wikipedia for <em>Why?</em></a>和<a href="https://stackoverflow.com/a/3155175/180174">Alex Martelli's answer</a>,以了解<em>如何实现?</em></li>
</ol>