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:
@@ -8,6 +8,15 @@
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"dev": "node -e \"console.log('dev not configured')\"",
|
||||
"lint": "node -e \"console.log('lint not configured')\"",
|
||||
"test": "node -e \"console.log('test not configured')\""
|
||||
"test": "vitest run --config vitest.config.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-sha512": "^0.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.3.10",
|
||||
"chai-bytes": "^0.1.2",
|
||||
"lodash-es": "^4.17.21",
|
||||
"vitest": "^2.0.5"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user