NanoXLSX Library Documentation
![]() | LowLevelGeneratePasswordHash Method |
Method to generate an Excel internal password hash to protect workbooks or worksheets
This method is derived from the c++ implementation by Kohei Yoshida (http://kohei.us/2008/01/18/excel-sheet-protection-password-hash/)
This method is derived from the c++ implementation by Kohei Yoshida (http://kohei.us/2008/01/18/excel-sheet-protection-password-hash/)
Namespace: NanoXLSX.LowLevel
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 1.2.3.0 (1.2.3)

C#
public static string GeneratePasswordHash( string password )
Parameters
- password
- Type: SystemString
Password string in UTF-8 to encrypt
Return Value
Type: String16 bit hash as hex string

WARNING! Do not use this method to encrypt 'real' passwords or data outside from NanoXLSX. This is only a minor security feature. Use a proper cryptography method instead.
