webcrypto.dart
webcrypto.dart copied to clipboard
Adding support for randomUUID
Implement randomUUID in webcrypto.dart
Changes
- Added
randomUUID()method. - Followed the W3C Web Crypto API specification.
- Checked BoringSSL but couldn't find an existing
randomUUIDimplementation, so implemented it based on the W3C spec. - Verified browser compatibility using Can I use—support looks good.
Testing
- Added test cases to validate UUID generation.
- Currently, the test runs a loop 100 times to generate UUIDs—open to feedback on whether this is the best approach.
Notes
- Fixes #187
- I'm still exploring the repository, so let me know if I missed anything.
Thank you for your feedback! I am currently in the middle of my examinations and will make the requested changes as soon as I get time.