Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ None.
### Dev-Dependencies

* typescript - for compiling the typescript source files to javascript
* @types/node - typescript definitions for node's API

Optionally:

Expand Down
20 changes: 5 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": "^14.19.0 || >=16.0.0"
"node": ">=17.4.0"
},
"license": "MIT",
"author": "QRDate.org + contributors",
Expand All @@ -23,7 +23,6 @@
"url": "https://github.com/qrdate/tinywasi.git"
},
"devDependencies": {
"@types/node": "^17.0.21",
"typescript": "^4.6.2"
},
"files": [
Expand Down
4 changes: 1 addition & 3 deletions src/TinyWASI.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as crypto from 'crypto';

export class TinyWASI {
private instance?: WebAssembly.Instance = undefined;

Expand Down Expand Up @@ -210,7 +208,7 @@ export class TinyWASI {

const buffer = new Uint8Array(memory.buffer, pointer, size);

crypto.randomFillSync(buffer);
crypto.getRandomValues(buffer);

return this.WASI_ERRNO_SUCCESS;
}
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"declaration": true,
"rootDir": "./src",
"outDir": "./dist",
"strict": true,
"types": [
"node"
],
"strict": true
}
}