Skip to content
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

Rust: (for 1.0.0) change lookup function return signature from Result<String, VaultError>->Result<Vec<u8>, VaultError> or similar #246

Closed
kahlstrm opened this issue Nov 5, 2023 · 0 comments · Fixed by #521
Labels
rust Pull requests that update Rust code

Comments

@kahlstrm
Copy link
Contributor

kahlstrm commented Nov 5, 2023

If we look at the current Vault::store function signature:

 pub async fn store(&self, name: &str, data: &[u8]) -> Result<(), VaultError>

compared to Vault::lookup:

 pub async fn lookup(&self, name: &str) -> Result<String, VaultError>

There is immediately the problem where we store something else than a valid UTF-8 string and try to look that up.

As we support storing encrypted arbitrary files, we should support looking up something that is not a valid UTF-8 string

This change breaks the current public interface, so I propose that this should be in the major 1.0.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant