Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
UmamiAppearance committed Sep 20, 2022
1 parent d8e59e5 commit c01ec27
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@ There a two possible methods available to create an instance:
#### new operator
```js
// default, SHA-256
const sha256 = new SHAObj();
const sha256 = new BrowserSHAObj();

// SHA-512
const sha512 = new SHAObj("SHA-512");
const sha512 = new BrowserSHAObj("SHA-512");
```

#### new method
```js
// default, SHA-256
const sha256 = await SHAObj.new();
const sha256 = await BrowserSHAObj.new();

// SHA-512
const sha512 = await SHAObj.new("SHA-512");
const sha512 = await BrowserSHAObj.new("SHA-512");
```

The method is asynchronous to allow you to associate a message in one go.
```js
// SHA-512
const sha512 = await SHAObj.new("SHA-512", "Hello World!");
const sha512 = await BrowserSHAObj.new("SHA-512", "Hello World!");
```


Expand Down

0 comments on commit c01ec27

Please sign in to comment.