Click or drag to resize
NanoXLSX

Utils.GeneratePasswordHash 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/)

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.2+7f12a949130e0be1e987e553d2d08c083176cdca
Syntax
C#
public static string GeneratePasswordHash(
	string password
)

Parameters

password  String
Password string in UTF-8 to encrypt

Return Value

String
16 bit hash as hex string
Remarks
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.
See Also