-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[async] fs
, File
and io
API
#97
Comments
This was referenced Aug 26, 2024
Closed
radumarias
added a commit
that referenced
this issue
Sep 23, 2024
- create fs layer with OpenOptions and File impl - impl AsyncRead, AsyncWrite, AsyncSeek for File
@someotherself how's it going with this? |
17 tasks
17 tasks
radumarias
added a commit
that referenced
this issue
Dec 24, 2024
…async. Make sure we zeroize String from path [async] fs, File and io API #97
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have a similar API like
tokio::fs::File
,tokio::fs
andtokio::fs::OpenOptions
that can work withEncryptedFs
. We should haveCryptoFile
with a similar API likeFile
that wraps corresponding crypto structs.Structure of
crypto
moduleexists
method uses local fsexists
method uses local fsFlow
crypto::fs_api::fs::OpenOptions
to create acrypto::fs_apifs::File
File
will split the path by OS's path separator and callEncryptedFs::find_by_name
until it gets theno
for the file.EncryptedFs::[open_read, open_write]
with theino
, which will return aCryptoReadSeek
orCryptoWriteSeek
and thefh
(file handle), which will be used onread
,write
andseek
methods ofRead
andWrite
traitsFile
object is dropped, we close the handle withEncryptedFs::release
crypto::fs_api::io
Flow is like this
This issue corresponds to
lib-users > crypto::fs_api::[fs, fs::OpenOptions, fs::File, io] > EncryptedFs
.The advantage is that a lib user could use encrypted files just like regular files by "just" changing the
use
statements, such as using files likejson
oryaml
. A good use case is that users could build a password manager or encrypted sticky notes.#246
The text was updated successfully, but these errors were encountered: