Skip to content

Commit

Permalink
Removed reference to --allow-read flag since that's only needed when …
Browse files Browse the repository at this point in the history
…using local file paths
  • Loading branch information
JamesBroadberry committed May 18, 2020
1 parent 9734116 commit de2a7e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is a port from [jBCrypt](https://github.com/jeremyh/jBCrypt) to TypeScript
It has zero third-party dependencies.

Running in sync requires no permissions.
Running in async functionality requires --allow-read, --allow-net and --unstable
Running in async functionality requires --allow-net and --unstable

## Import

Expand All @@ -19,7 +19,7 @@ import * as bcrypt from "https://deno.land/x/bcrypt/mod.ts";

### Async

The Async implementation requires WebWorkers which require --allow-read to import relative files and --allow-net to import Deno standard modules. Also, to [allow Crypto inside a WebWorker](https://github.com/denoland/deno/pull/5121), you'll need to use the --unstable flag too.
The Async implementation requires WebWorkers which require --allow-net to import Deno standard modules from inside the Worker. Also, to [allow Crypto inside a WebWorker](https://github.com/denoland/deno/pull/5121), you'll need to use the --unstable flag too.

```ts
const hash = await bcrypt.hash("test");
Expand Down
6 changes: 3 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as bcrypt from "./bcrypt/bcrypt.ts";

/**
* Generate a hash for the plaintext password
* Requires --allow-net, --allow-read and --unstable flags
* Requires --allow-net and --unstable flags
*
* @export
* @param {string} plaintext The password to hash
Expand Down Expand Up @@ -36,7 +36,7 @@ export async function hash(

/**
* Generates a salt using a number of log rounds
* Requires --allow-net, --allow-read and --unstable flags
* Requires --allow-net and --unstable flags
*
* @export
* @param {(number | undefined)} [log_rounds=undefined] Number of log rounds to use. Recommended to leave this undefined.
Expand Down Expand Up @@ -67,7 +67,7 @@ export async function genSalt(

/**
* Check if a plaintext password matches a hash
* Requires --allow-net, --allow-read and --unstable flags
* Requires --allow-net and --unstable flags
*
* @export
* @param {string} plaintext The plaintext password to check
Expand Down

0 comments on commit de2a7e9

Please sign in to comment.