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
4 changes: 4 additions & 0 deletions docs/generichashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ sodium.crypto_generichash_batch(out, inArray, [key])
Same as `crypto_generichash`, except that this hashes an array of `buffer`'s instead of a single one.
***
## Instance API
__No longer supported from sodium-native v3.0.0, see Stateful API below__

## `crypto_generichash_instance`
![sodium-native][node] ![sodium-javascript][js]
``` js
Expand All @@ -68,6 +70,8 @@ Finalizes the instance.
The generated hash is stored in `out`.

## Stateful API
__Replaces the above instance implementation from sodium-native v3.0.0__

Replaces the above instance implementation in the N-API release
## `crypto_generichash_init`
![sodium-native][node]
Expand Down
5 changes: 4 additions & 1 deletion docs/nonauthstreamingencryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ The encrypted data is stored in `c`. To decrypt, swap `c` and `m`. Also supports
Encryption defaults to `XSalsa20`, use `crypto_stream_chacha20_xor` if you want to encrypt/decrypt with `ChaCha20` instead.
***
## Instance API
__No longer supported from sodium-native v3.0.0, see Stateful API below__

## `crypto_stream_xor_instance`
![sodium-native][node] ![sodium-javascript][js]
``` js
Expand Down Expand Up @@ -90,7 +92,8 @@ instance.final()
Finalizes the stream. Zeros out internal state.

## Stateful API
Replaces the above instance implementation in the N-API release
__Replaces the above instance implementation from sodium-native v3.0.0__

## `crypto_stream_xor_init`
![sodium-native][node]
```js
Expand Down
5 changes: 4 additions & 1 deletion docs/onetimeauthentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Verifies a token.
Returns `true` if the token could be verified. Otherwise `false`.
***
## Instance API
__No longer supported from sodium-native v3.0.0, see Stateful API below__

## `crypto_onetimeauth_instance`
![sodium-native][node]
``` js
Expand All @@ -66,7 +68,8 @@ Finalizes the instance.
The generated hash is stored in `out`.

## Stateful API
Replaces the above instance implementation in the N-API release
__Replaces the above instance implementation from sodium-native v3.0.0__

## `crypto_onetimeauth_init`
![sodium-native][node]
```js
Expand Down
7 changes: 5 additions & 2 deletions docs/sha.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ Hashes a value to a short hash based on a key.

The generated short hash is stored in `out`.
***
## Stateful API
## Instance API
__No longer supported from sodium-native v3.0.0, see Stateful API below__

## `crypto_hash_sha256_instance`
![sodium-native][node]
``` js
Expand Down Expand Up @@ -97,7 +99,8 @@ Finalizes the instance.
The generated hash is stored in `out`.

## Stateful API
Replaces the above instance implementation in the N-API release
__Replaces the above instance implementation from sodium-native v3.0.0__

## `crypto_hash_sha256_init`
![sodium-native][node]
```js
Expand Down
5 changes: 4 additions & 1 deletion docs/streamencryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Generates a new encryption key.
The generated key is stored in `k`.
***
## Opaque API
__No longer supported from sodium-native v3.0.0, see Stateful API below__

## `crypto_secretstream_xchacha20poly1305_state_new`
![sodium-native][node]
``` js
Expand Down Expand Up @@ -95,7 +97,8 @@ sodium.crypto_secretstream_xchacha20poly1305_rekey(state)
Rekeys the opaque `state` object.

## Stateful API
Replaces the above instance implementation in the N-API release.
__Replaces the above Opaque implementation from sodium-native v3.0.0__

``` js
var state = Buffer.alloc(sodium.crypto_secretstream_xchacha20poly1305_STATEBYTES)
```
Expand Down