You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your examples mostly showcase usage with raw bytes. Could you help me out on working with a String that I want to securely store inside one of the Secret variants? The String is read from the tty (it's a user-entered password).
The SecretBox documentation showcases an example where some bytes are moved into SecretVec by using the from method. Is that currently the only way to accomplish this?
Thanks for helping me out!
The text was updated successfully, but these errors were encountered:
std::io::Stdin implments the Read trait, so you can read raw bytes from it into a provided buffer (such as that returned by secret.borrow_mut()).
That's not the most useful thing right now since generally you want to read lines (which go into a String). I can look and see what I can do about providing a way to borrow the internal contents directly as a string.
Hey!
Your examples mostly showcase usage with raw bytes. Could you help me out on working with a String that I want to securely store inside one of the Secret variants? The String is read from the tty (it's a user-entered password).
The
SecretBox
documentation showcases an example where some bytes are moved intoSecretVec
by using thefrom
method. Is that currently the only way to accomplish this?Thanks for helping me out!
The text was updated successfully, but these errors were encountered: