You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fujinet-fuji.h
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -547,27 +547,27 @@ enum HashType
547
547
SHA512
548
548
};
549
549
550
-
typedefenumHashType_hash_type;
550
+
typedefenumHashTypehash_alg_t;
551
551
552
552
/**
553
553
* @brief Returns the size of the hash that will be produced for the given hash_type and whether hex output is required or not. This should be used to calculate the memory needed for the output of \ref fuji_hash_data
554
-
* @param hash_type The \ref _hash_type "type of hash" to use: MD5, SHA1, SHA256, SHA512
554
+
* @param hash_type The \ref hash_alg_t "type of hash" to use: MD5, SHA1, SHA256, SHA512
555
555
* @param as_hex True if the returned data should be a hex string, false if it should be binary. Hex has twice the length as binary in the output.
556
556
* @return the length of the hash that will be computed for this algorithm depending on whether hex is being returned or not.
* @brief Computes the hash of the given input data in a single operation. This is a simpler interface than using \ref fuji_hash_clear, \ref fuji_hash_add, \ref fuji_hash_calculate, and can be used instead of those 3 operations if there is only 1 piece of data to hash.
562
562
* This will also clear any data previously add using fuji_hash_add, and also clears any memory associated with hashing in the FujiNet at the end of the operation. It is the one stop shop, if you use it with the other 3 functions, you must sequence them correctly so this function doesn't clear the existing sent data.
563
-
* @param hash_type The \ref _hash_type "type of hash" to use: MD5, SHA1, SHA256, SHA512
563
+
* @param hash_type The \ref hash_alg_t "type of hash" to use: MD5, SHA1, SHA256, SHA512
564
564
* @param input The binary data that requires hash computed on
565
565
* @param length The length of binary data in "input" to compute a hash on
566
566
* @param as_hex True if the returned data should be a hex string, false if it should be binary. Hex has twice the length as binary in the output.
567
567
* @param output The buffer to write the hash value to. This must be allocated by the application itself, it is not done in the library. \ref fuji_hash_value "fuji_hash_value()".
* @brief Clear any data associated with hashing in the Fujinet. Should be called before calculating new hashes when using \ref fuji_hash_add and \ref fuji_hash_calculate. Can also be called to discard any data previously sent to free memory on the FujiNet used for any previous data sent with \ref fuji_hash_add.
* @brief Calculates the hash of the accumulated data. Can be called multiple times with different hash_type values on the same data if discard_data is false. If different data is required to be hashed, call \ref fuji_hash_clear to start over, then add data with \ref fuji_hash_add again.
588
-
* @param hash_type The \ref _hash_type "type of hash" to use: MD5, SHA1, SHA256, SHA512
588
+
* @param hash_type The \ref hash_alg_t "type of hash" to use: MD5, SHA1, SHA256, SHA512
589
589
* @param as_hex True if the returned data should be a hex string, false if it should be binary. Hex has twice the length as binary in the output.
590
590
* @param discard_data If true the data will be freed from FujiNet memory after the hash is calculated. Use false if you are calculating more than one hash type on the data, and end with discard_data is true, or call \ref fuji_hash_clear to also clean up.
591
591
* @param output The buffer to write the hash to. The caller is responsible for allocating enough memory for this (based on \ref fuji_hash_length)
0 commit comments