From 7e8991aaeb95eb2ee18da99506e3da15af054b5c Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Fri, 20 Mar 2020 11:26:34 +0100 Subject: [PATCH 1/2] add warning about instance api --- docs/generichashing.md | 4 ++++ docs/nonauthstreamingencryption.md | 5 ++++- docs/onetimeauthentication.md | 5 ++++- docs/sha.md | 7 +++++-- docs/streamencryption.md | 5 ++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/generichashing.md b/docs/generichashing.md index 777c012..49c88b4 100644 --- a/docs/generichashing.md +++ b/docs/generichashing.md @@ -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 supprted from sodium-native v3.0.0, see Stateful API below__ + ## `crypto_generichash_instance` ![sodium-native][node] ![sodium-javascript][js] ``` js @@ -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] diff --git a/docs/nonauthstreamingencryption.md b/docs/nonauthstreamingencryption.md index c54b552..b71b0e7 100644 --- a/docs/nonauthstreamingencryption.md +++ b/docs/nonauthstreamingencryption.md @@ -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 supprted from sodium-native v3.0.0, see Stateful API below__ + ## `crypto_stream_xor_instance` ![sodium-native][node] ![sodium-javascript][js] ``` js @@ -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 diff --git a/docs/onetimeauthentication.md b/docs/onetimeauthentication.md index 8fbe2d5..99fdcbf 100644 --- a/docs/onetimeauthentication.md +++ b/docs/onetimeauthentication.md @@ -41,6 +41,8 @@ Verifies a token. Returns `true` if the token could be verified. Otherwise `false`. *** ## Instance API +__No longer supprted from sodium-native v3.0.0, see Stateful API below__ + ## `crypto_onetimeauth_instance` ![sodium-native][node] ``` js @@ -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 diff --git a/docs/sha.md b/docs/sha.md index d7d469e..d2b9379 100644 --- a/docs/sha.md +++ b/docs/sha.md @@ -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 supprted from sodium-native v3.0.0, see Stateful API below__ + ## `crypto_hash_sha256_instance` ![sodium-native][node] ``` js @@ -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 diff --git a/docs/streamencryption.md b/docs/streamencryption.md index b9791ba..17f93df 100644 --- a/docs/streamencryption.md +++ b/docs/streamencryption.md @@ -33,6 +33,8 @@ Generates a new encryption key. The generated key is stored in `k`. *** ## Opaque API +__No longer supprted from sodium-native v3.0.0, see Stateful API below__ + ## `crypto_secretstream_xchacha20poly1305_state_new` ![sodium-native][node] ``` js @@ -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) ``` From 636dfdfaed98053b7f63d8b7d194467bfa64bcc0 Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Fri, 20 Mar 2020 11:49:44 +0100 Subject: [PATCH 2/2] typo --- docs/generichashing.md | 2 +- docs/nonauthstreamingencryption.md | 2 +- docs/onetimeauthentication.md | 2 +- docs/sha.md | 2 +- docs/streamencryption.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/generichashing.md b/docs/generichashing.md index 49c88b4..c1ec28d 100644 --- a/docs/generichashing.md +++ b/docs/generichashing.md @@ -42,7 +42,7 @@ 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 supprted from sodium-native v3.0.0, see Stateful API below__ +__No longer supported from sodium-native v3.0.0, see Stateful API below__ ## `crypto_generichash_instance` ![sodium-native][node] ![sodium-javascript][js] diff --git a/docs/nonauthstreamingencryption.md b/docs/nonauthstreamingencryption.md index b71b0e7..24dc76c 100644 --- a/docs/nonauthstreamingencryption.md +++ b/docs/nonauthstreamingencryption.md @@ -59,7 +59,7 @@ 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 supprted from sodium-native v3.0.0, see Stateful API below__ +__No longer supported from sodium-native v3.0.0, see Stateful API below__ ## `crypto_stream_xor_instance` ![sodium-native][node] ![sodium-javascript][js] diff --git a/docs/onetimeauthentication.md b/docs/onetimeauthentication.md index 99fdcbf..f976a31 100644 --- a/docs/onetimeauthentication.md +++ b/docs/onetimeauthentication.md @@ -41,7 +41,7 @@ Verifies a token. Returns `true` if the token could be verified. Otherwise `false`. *** ## Instance API -__No longer supprted from sodium-native v3.0.0, see Stateful API below__ +__No longer supported from sodium-native v3.0.0, see Stateful API below__ ## `crypto_onetimeauth_instance` ![sodium-native][node] diff --git a/docs/sha.md b/docs/sha.md index d2b9379..53a717c 100644 --- a/docs/sha.md +++ b/docs/sha.md @@ -39,7 +39,7 @@ Hashes a value to a short hash based on a key. The generated short hash is stored in `out`. *** ## Instance API -__No longer supprted from sodium-native v3.0.0, see Stateful API below__ +__No longer supported from sodium-native v3.0.0, see Stateful API below__ ## `crypto_hash_sha256_instance` ![sodium-native][node] diff --git a/docs/streamencryption.md b/docs/streamencryption.md index 17f93df..075f7b9 100644 --- a/docs/streamencryption.md +++ b/docs/streamencryption.md @@ -33,7 +33,7 @@ Generates a new encryption key. The generated key is stored in `k`. *** ## Opaque API -__No longer supprted from sodium-native v3.0.0, see Stateful API below__ +__No longer supported from sodium-native v3.0.0, see Stateful API below__ ## `crypto_secretstream_xchacha20poly1305_state_new` ![sodium-native][node]