Proposing to have `flush()` method
See original GitHub issue_privKey
and _pubKey
are always accessible that’s make me uncomfortable. I’m propose to have this one.
Wallet.prototype.flush = function () {
assert(Buffer.isBuffer(this._privKey), 'Private key should be an instance of Buffer')
this._privKey.fill(0x00);
assert(Buffer.isBuffer(this._pubKey), 'Public key should be an instance of Buffer')
this._pubKey.fill(0x00);
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Do I need to explicitly use flush() method there? - java
They call the internal newLine() method, where autoflush gets checks for and executed. Look at the source code of PrintWriter, there you can...
Read more >KIP-8 - Add a flush method to the producer API
There are two problems with this usage, first it is sort of annoying to iterate through all the futures to wait until they...
Read more >io.Flusher, io.WriteFlusher and io.WriteCloseFlusher · Issue ...
I think it would be useful to provide an interface within the io package that has a Flush method. I therefore propose the...
Read more >PrintWriter flush() method in Java with Examples
The flush() method of PrintWriter Class in Java is used to flush the stream. By flushing the stream, it means to clear the...
Read more >Client Class — ESP8266 Arduino Core documentation
flush() returning true indicates that output data have effectively been sent, and false that a timeout has occurred. stop() returns false in case...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
IMO having such a method would give a false sense of security to the users of this library. It’s not easy to be sure that every copy of the key was erased, especially when the private key is used by external libraries.
I’ve tried to do some experiments and observe result. We can’t remove the value from the memory easily even using
delete
but we can overwrite it.