-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update workflow-rs to 0.10.3 and fix JS data encryption bindings (#396)
* Update workflow-rs to 0.10.3 * add encryption example * fix decrypt_xchacha20poly1305 JS bindings --------- Co-authored-by: Michael Sutton <mikisiton2@gmail.com>
- Loading branch information
1 parent
b88b9ce
commit cb2a072
Showing
5 changed files
with
67 additions
and
53 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const kaspa = require('./kaspa/kaspa_wasm'); | ||
|
||
kaspa.initConsolePanicHook(); | ||
|
||
(async () => { | ||
|
||
let encrypted = kaspa.encryptXChaCha20Poly1305("my message", "my_password"); | ||
console.log("encrypted:", encrypted); | ||
let decrypted = kaspa.decryptXChaCha20Poly1305(encrypted, "my_password"); | ||
console.log("decrypted:", decrypted); | ||
|
||
})(); |