webcrypto.dart icon indicating copy to clipboard operation
webcrypto.dart copied to clipboard

Adding support for randomUUID

Open Dhruv-Maradiya opened this issue 9 months ago • 1 comments

Implement randomUUID in webcrypto.dart

Changes

  • Added randomUUID() method.
  • Followed the W3C Web Crypto API specification.
  • Checked BoringSSL but couldn't find an existing randomUUID implementation, 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.

Dhruv-Maradiya avatar Mar 10 '25 17:03 Dhruv-Maradiya

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.

Dhruv-Maradiya avatar Apr 28 '25 03:04 Dhruv-Maradiya