Crypto: Hasher state export/import for the built-in backend (closes #53)
This commit is contained in:
1 parent
217b20e37a
commit
7d6834979e
5 files changed
+325
No files matched your search
@@ -47,6 +47,16 @@ namespace Void::Crypto
|
||||
/// error. Backend update/finalize failures poison the hasher.
|
||||
[[nodiscard]] Void::Result::Result<Digest> finalize();
|
||||
|
||||
/// Serialize the in-progress state for resumable hashing. Available
|
||||
/// on the built-in backend; the OpenSSL provider has no portable
|
||||
/// state export and returns unsupported_algorithm.
|
||||
[[nodiscard]] Void::Result::Result<std::vector<std::byte>>
|
||||
export_state() const;
|
||||
|
||||
/// Restore a state produced by export_state() on this hasher.
|
||||
[[nodiscard]] Void::Result::Result<void>
|
||||
import_state(std::span<const std::byte> state);
|
||||
|
||||
private:
|
||||
|
||||
struct Impl;
|
||||
|
||||
Reference in new issue
Block a user