Not sure if this is a feature request or a question...
I was previously using the blake2-rfc crate and now I want to migrate to the blake2 crate. However previously I was using the Blake2b::with_key constructor (as per https://docs.rs/blake2-rfc/0.2.18/blake2_rfc/blake2b/struct.Blake2b.html#method.with_key) and I can't seem to find the proper equivalent in case of the blake2 crate.
There seems to exist Blake2bVarCore::new_with_params (as per https://docs.rs/blake2/0.10.2/blake2/struct.Blake2bVarCore.html#method.new_with_params), however I can't seem to convert that into a Blake2bVar (which I need to get variable hash output).
Based on the current blake2b implementation, it seems I should be able to just replace the core member of the Blake2bVar with the Blake2bVarCore instance, which indeed works if I "hack my way" by using pointers. However there is no "official" (as per the public API) way of doing this.
A simple From implementation, or even an unsafe constructor that takes a Blake2bVarCore and yields a Blake2bVar would seem to suffice.
Not sure if this is a feature request or a question...
I was previously using the
blake2-rfccrate and now I want to migrate to theblake2crate. However previously I was using theBlake2b::with_keyconstructor (as per https://docs.rs/blake2-rfc/0.2.18/blake2_rfc/blake2b/struct.Blake2b.html#method.with_key) and I can't seem to find the proper equivalent in case of theblake2crate.There seems to exist
Blake2bVarCore::new_with_params(as per https://docs.rs/blake2/0.10.2/blake2/struct.Blake2bVarCore.html#method.new_with_params), however I can't seem to convert that into aBlake2bVar(which I need to get variable hash output).Based on the current
blake2bimplementation, it seems I should be able to just replace thecoremember of theBlake2bVarwith theBlake2bVarCoreinstance, which indeed works if I "hack my way" by using pointers. However there is no "official" (as per the public API) way of doing this.A simple
Fromimplementation, or even anunsafeconstructor that takes aBlake2bVarCoreand yields aBlake2bVarwould seem to suffice.