Skip to content

How do i clear sensitive data from memory after using it? #10852

Answered by FabianLars
rmarinn asked this question in Q&A
Discussion options

You must be logged in to vote

Just copying the data into the user's clipboard through rust might work but i also have a feature where the user can view the data in the front-end so I would still have a problem of having to clear that data.

For security this would really be the best. Period.

There isn't reallyyy a way to clear the webview's memory. The closest thing would be location.reload() but even that basically just raises the chance of the secret being cleared, not guarantee it.

Some say that using typed arrays and overwriting them with 0s work but that also only for relatively simple use cases. A bit tricky to make sure there are no copies made (i assume having to convert it to/from a readable string to show y…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rmarinn
Comment options

Answer selected by rmarinn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants