Merged
Conversation
Removed unused code and refactored the signature generation process. Updated the 'addSignatureToNanoTDF' function to handle exceptions thrown by the 'generateECDSASignature'. Tests and other components using these methods have been updated accordingly. Added new files CryptoHelperTests.swift and InitializationTests.swift for better testing framework.
This commit adds a new BinaryParser class to handle encoding and decoding tasks. It also includes changes in CryptoHelperTests.swift for improved key pair generation, and updates to the main project configuration to include the BinaryParser.swift file in project sources. Finally, it removes duplicative coding from the NanoTDF.swift file to make use of the newly-added BinaryParser class.
New functions for creating a Nano Document Format (NanoTDF) and adjusting the encryption payload have been added. This reflects changes in the Policy, EmbeddedPolicyBody, and KasMetadata structures. An adjustNonce method has also been introduced to pad or trim the nonce to the required length. Besides, the impact on related tests and other classes has been managed.
This commit includes modifications to handling of key access in BinaryParser and changes the way the ephemeral public key data is represented in NanoTDF. Removed redundant code in BinaryParser by eliminating unnecessary if-else checks and updated how bindingSize is calculated. Some previously commented code in the test suite has been uncommented and refined, ensuring a more accurate validation of our tests. Now, the test suite also checks the existence of the ephemeral public key.
This commit updates test method naming, removing underscore from the name to enhance readability and consistency. Changes were made to the "BinaryParser" where an optional "keyAccess" is now properly handled. A non-functional test case "testCreateNanoTDFWithInvalidKasMetadata" was also removed from "NanoTDFCreationTests".
|
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.




Implement NanoTDF creation and adjustment of encryption payload
New functions for creating a Nano Document Format (NanoTDF) and adjusting the encryption payload have been added. This reflects changes in the Policy, EmbeddedPolicyBody, and KasMetadata structures. An adjustNonce method has also been introduced to pad or trim the nonce to the required length. Besides, the impact on related tests and other classes has been managed.
Refactor code for readability and conciseness
Removed unused code and refactored the signature generation process. Updated the 'addSignatureToNanoTDF' function to handle exceptions thrown by the 'generateECDSASignature'. Tests and other components using these methods have been updated accordingly. Added new files CryptoHelperTests.swift and InitializationTests.swift for better testing framework.