Closed tarakby closed 4 months ago
This update introduces significant changes to the cryptographic testing framework within the Flow SDK. The previous CryptoTest
class has been replaced by a focused HashTest
class, emphasizing hashing functionalities. Moreover, new tests have been added to ensure the reliability of key pair generation, decoding, and signature operations. Overall, these changes enhance the robustness and clarity of the cryptographic testing suite, promoting better maintenance and accuracy in future developments.
Files | Change Summary |
---|---|
sdk/src/test/kotlin/org/onflow/flow/sdk/crypto/HashTest.kt , .../SignTest.kt |
HashTest replaces CryptoTest , focusing on hashing. New SignTest file adds tests for key pair generation, decoding, and signatures. |
sdk/src/test/kotlin/org/onflow/flow/sdk/models/HashSigningAlgorithmTest.kt |
New tests for SignatureAlgorithm and HashAlgorithm , validating method functionalities and input handling. |
sequenceDiagram
participant User
participant CryptoClass
participant HashingAlgorithm
participant SignatureAlgorithm
User->>CryptoClass: Request hasher
CryptoClass->>HashingAlgorithm: Obtain hasher
HashingAlgorithm->>CryptoClass: Return hasher
CryptoClass->>User: Provide hasher
User->>CryptoClass: Generate key pair
CryptoClass->>SignatureAlgorithm: Create key pair
SignatureAlgorithm->>CryptoClass: Return key pair
CryptoClass->>User: Provide key pair
🐇 In the meadow where bunnies hop,
New tests flourish, they never stop!
Hashes and signatures, all in line,
With every change, the code will shine!
So let’s celebrate, with joy and cheer,
A cryptographic world, bright and clear! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
0 files ±0 0 suites ±0 0s :stopwatch: ±0s 0 tests ±0 0 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 78df08b2. ± Comparison against base commit 78df08b2.
:recycle: This comment has been updated with latest results.
2 files 2 suites 33s :stopwatch: 6 tests 6 :heavy_check_mark: 0 :zzz: 0 :x:
Results for commit a8076aed.
0 files ±0 0 suites ±0 0s :stopwatch: ±0s 0 tests ±0 0 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit 78df08b2. ± Comparison against base commit 78df08b2.
:recycle: This comment has been updated with latest results.
This PR reorganizes the crypto related test files, to prepare for a follow-up refactor PR. There are no logic changes:
split the long crypto implementation test file into hashing and signing test files. This is because the follow-up PR expands the signing tests, and it didn't make sense to have all tests in one single file.
The purpose of this PR is to make reviewing the follow-up #71 easier, since all changes would happen in the same files without moving code around.
Summary by CodeRabbit
New Features
HashTest
class.SignTest
class.SignatureAlgorithm
andHashAlgorithm
in theHashSigningAlgorithmTest
to enhance reliability of the SDK.Bug Fixes
Documentation