Why Should I Use Simple Crypt?. It uses standard, well-known algorithms, closely following therecommendations. The established, efficientlibrary provides the algorithm implementations (the cipher used is AES256). It includes a check (an HMAC with SHA256) to warn when ciphertextdata are modified. It tries to make things as secure as possible when poor qualitypasswords are used (PBKDF2 with SHA256, a 256 bit random salt(increased from 128 bits in release 3.0.0), and 100,000 rounds(increased from 10,000 in release 4.0.0)). But that doesn’t meanyou should use a poor password!. Using a library, rather than writing your own code, means that wehave less solutions to the same problem.
Click 'Encrypt PDF' to add the password to the PDF. Download your encrypted PDF file! How To Protect PDF. How To Protect PDF. How to Lock a PDF from Editing or Copying. The quickest way to protect and prevent the content of your PDF document from being edited or copied.
That means more chance offinding bugs, which means more reliable, more secure code. If simple-crypt does have a bug, the use of a header in theciphertext data will help support an upgrade path (I can’t promisefull backwards support, because any solution will depend on theattack, but at least the needed information is present).
What Else Should I Know?.You must also install pycrypto. Note that pycrypto hasparts written in C so requires a full python install.
On some unixsystems that may mean adding a package like python-dev from yourpackage manager.In Python 3 the outputs from encrypt and decrypt arebytes. If you started with string input then you can convertthe output from decrypt using.decode('utf8'): mystring = decrypt('password', ciphertext).decode('utf8').More.Later versions can decrypt data from previous versions, but dataencrypted by later (major) versions cannot be decrypted by earliercode (instead, an error is raised asking the user to update to thelatest version).(c) 2012-2015 Andrew Cooke,;2013,.Released into the public domain for any use, but with absolutely no warranty.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |