Open anatse opened 6 months ago
I don't have a problem with adding this, but I don't have cycles to do the work on it, so somebody would need to contribute it.
digest::Algorithm
or `digest::AlgorithmId
. Instead the user should pass in the &digest::Algorithm
. The user will need to be responsible for keeping track of what algorithm goes to which bytes.
For some cases, such as compute hash sum for very big data passed through the HTTP streams, it is necessary to store and restore digest context. Our case: we are have storage which provides HTTP API to download with resume, using ranges. And this storage provides SHA_XXX hash sum for whole provided data, not for part. Therefore it need to check integrity for all data at the end of stream. In most cases it is not possible to complete the operation in one session, in cause to network errors. And compute whole hash sum using ring impossible because Context cannot be restored from pervious session. We also cannot see whole data at a time because we are acts just as a proxy and target system also not provides as a hash sum.