mafintosh / mafintosh/random-bytes-seed
Doesn't work with different sized buffers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
This code should work (according to me, maybe your intention was different):
```js
import seed from 'random-bytes-seed'
import { deepStrictEqual } from 'assert'
const random0 = seed('seed')
const buffer0 = random0(10)
const random1 = seed('seed')
const buffer1 = Buffer.concat([random1(5), random1(5)])
deepStrictEqual(buffer1, buffer0)
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the package entry point for the seed function and reproduce the issue with the two buffer constructions shown in the report. Compare the output for one 10-byte request with two 5-byte requests, then verify the intended behavior before adding or updating coverage for the chosen result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100