feat: Implement LiteHashDRBG and RNG utilities

- Added BytesLike type for handling various byte representations.
- Implemented LiteHashDRBG class for SHA-512 based deterministic random bit generator.
- Created RNG interface defining methods for random number generation.
- Developed RandUtil class providing utility functions for RNG operations.
- Added conversion functions for BytesLike to ArrayBuffer and Uint8Array.
- Implemented comprehensive tests for RNG functionality and expected behaviors.
- Configured Vitest for testing environment setup.
This commit is contained in:
2025-12-27 04:45:59 +00:00
parent 206aa64c64
commit b3875a111f
12 changed files with 1751 additions and 5 deletions
+6
View File
@@ -2,3 +2,9 @@ export * from './domain/entities';
export * from './ports/rng';
export * from './ports/world';
export * from './triggers';
export * from './util/BytesLike';
export * from './util/convertBytesLikeToArrayBuffer';
export * from './util/convertBytesLikeToUint8Array';
export * from './util/LiteHashDRBG';
export * from './util/RNG';
export * from './util/RandUtil';