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
<html> | |
<head> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> | |
</head> | |
<body> | |
<!-- Note the usage of `type=module` here as this is an ES6 module --> | |
<script src="mock_data.js"></script> | |
<script type="module" src="main.js"></script> |
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
diff --git a/src/FsChaCha20/fschacha20.rs b/src/FsChaCha20/fschacha20.rs | |
index ba8e185..781c3e1 100644 | |
--- a/src/FsChaCha20/fschacha20.rs | |
+++ b/src/FsChaCha20/fschacha20.rs | |
@@ -54,6 +54,9 @@ impl FSChaCha20 { | |
} | |
pub fn decrypt(&mut self, chunk: &[u8]) -> Vec<u8> { | |
+ if self.key[0] == 0 { | |
+ println!("Key is not initialized"); |
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
# In order to run this example in Unix-like systems, like linux, you should click in "raw" and copy-paste the code in a .js file | |
# like main.js. The run the follow: | |
npm init | |
npm install node-bitcoin-rpc bignumber.js | |
node main.js |