hash(data,salt,progress,cb)中,progress這個參數怎么用?
這是我找到的hash參數的解釋,可還是不會用,知道的同學請幫我解釋一下,謝謝!
hash(data, salt, progress, cb)
error - First parameter to the callback detailing any errors.
result - Second parameter to the callback providing the encrypted form.
data - [REQUIRED] - the data to be encrypted.
salt - [REQUIRED] - the salt to be used to hash the password.
progress - a callback to be called during the hash calculation to signify progress
callback - [REQUIRED] - a callback to be fired once the data has been encrypted.
2016-07-21
hash(data, salt, progress, cb)
data——[要求]被加密的數據。
salt——[要求]鹽用于哈希密碼。
progress——一個回調期間被稱為哈希計算意味著進步
callback——[要求]——一個回調被解雇一旦數據已經加密。
????????error——第一個參數的回調詳述任何錯誤。
????????result——第二個參數的回調提供加密的形式
這里可以設置為 NULL