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
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.
The text was updated successfully, but these errors were encountered:
anatse
changed the title
Add functional store/restore to digest::Context
Add functionality store/restore to digest::Context
May 8, 2024
anatse
changed the title
Add functionality store/restore to digest::Context
Add store/restore functionality to digest::Context
May 8, 2024
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.
The format of the internal state should be opaque to the API. The API should export/import a slice of bytes. This means we need to pick an endianness for the bytes. I suggest little endian, since that's less work for most targets.
We shouldn't try to serialize 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.
The APIs should be named "....less_safe()`.
We should have tests that exercise every algorithm, in the same style as the existing digest tests.
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.
The text was updated successfully, but these errors were encountered: