Created
May 29, 2016 18:10
-
-
Save worace/a89d50eadf4f4937f793df9a1dbdc045 to your computer and use it in GitHub Desktop.
Electron Woes
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
ipc.on("request-rsa-key", (event, keyLength) => { | |
console.log("Renderer requested RSA key of length", keyLength); | |
var k = new NodeRSA({b: keyLength}) | |
event.sender.send('rsa-key', k); | |
console.log("***** Main Finished Key *****") | |
}); |
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
(.on ipc | |
"rsa-key" | |
(fn [event kp] | |
(set! (.-keyPair js/window) kp) | |
(println "Recevied key:" kp) | |
(write-file (str wallet-directory "/" file-name ".der") (private-der kp)) | |
(println "wrote wallet file") | |
(a/put! channel {:event :wallet-loaded | |
:data {:address (public-der kp) | |
:key kp | |
:name file-name}}))) | |
(.send ipc "request-rsa-key" 2048) | |
(println "Sent request to main...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment