;i>ddZdS)cd}t|dD])\}}t||z}|dz }|dz}|||zz}*|t|z}|dz}tt |ddS)a Create a password hash from a given string for protecting a worksheet only. This will not work for encrypting a workbook. This method is based on the algorithm provided by Daniel Rentz of OpenOffice and the PEAR package Spreadsheet_Excel_Writer by Xavier Noguer . See also http://blogs.msdn.com/b/ericwhite/archive/2008/02/23/the-legacy-hashing-algorithm-in-open-xml.aspx iiKN) enumerateordlenstrhexupper)plaintext_passwordpasswordidxcharvalue rotated_bitss MC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\openpyxl/utils/protection.py hash_passwordrsH1155++ TD S {  U\)* &'''H H s8}}   # # % %abb ))N)r)rrrrs#******r