-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dpapi): implement MS-GKDI and DPAPI Blob encoding/decoding #348
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
Remark on the Error type. It seems to me that the Error type is kind of becoming a big catch-all Error enum. It’s typically better to hand out more targeted errors to the users, so they can match on what matters for the domain. Had a similar discussion with Vlad recently: Devolutions/devolutions-gateway#1172 (comment)
Also saw this topic comes back in this blog post, as "umbrella errors": https://www.howtocodeit.com/articles/the-definitive-guide-to-rust-error-handling#umbrella-errors
Thanks to thiserror
, it’s easier to create new smaller errors dedicated to the domain. Feel free to use it as much as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s solid work! LGTM!
|
||
/// Decodes a UTF-16–encoded byte slice into a [String]. | ||
/// | ||
/// The input `data` slice should has the size multiple of two (`data.len() % 2 == 0`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: should have
Hi,
I implemented MS-GKDI structures and DPAPI Blob encoding/decoding in this PR.
Docs & references: