Add support for additional data (AD) in Sel.SecretKey.Stream#183
Merged
Kleidukos merged 3 commits intohaskell-cryptography:mainfrom Mar 21, 2025
Merged
Conversation
intricate
commented
Feb 19, 2025
Comment on lines
+515
to
+520
| additionalDataFromHexByteString | ||
| :: Base16 StrictByteString | ||
| -> Either AdditionalDataHexDecodingError AdditionalData | ||
| additionalDataFromHexByteString hexBs = | ||
| case Base16.decodeBase16Untyped (Base16.extractBase16 hexBs) of |
Contributor
Author
There was a problem hiding this comment.
This pattern of calling decodeBase16Untyped . extractBase16 instead of decodeBase16 on a Base16 a value confuses me a bit (#144 (comment)), but I've done this here to be consistent with similar functions in this module.
intricate
commented
Feb 19, 2025
| , MessageTag (..) | ||
|
|
||
| -- ** Additional data (AD) | ||
| , AdditionalData (..) |
Contributor
Author
There was a problem hiding this comment.
Thoughts on me exposing this constructor? Or would you prefer a function like additionalDataFromBinary or something like that?
Member
There was a problem hiding this comment.
If the constructor is not needed to use the API and would just be used for access, then you can just expose additionalDataFromBinary indeed. :)
7238194 to
dbc8aa6
Compare
Member
|
@intricate Thanks! I'll take time to review and think about your comment in #144 :) |
3d619d4 to
3c7c6ca
Compare
3c7c6ca to
3c5c401
Compare
Kleidukos
requested changes
Mar 21, 2025
f25e7f4 to
5ed8716
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for specifying AAD in
Sel.SecretKey.Stream.