Skip to content

Add storage adapter nostr-mls-slqcipher-storage #932

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wcat7
Copy link

@wcat7 wcat7 commented Jun 18, 2025

Description

Add a separate storage adapter nostr-mls-slqcipher-storage

Notes to the reviewers

#866 (comment)

Copy link
Member

@yukibtc yukibtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a very fast look and the cood looks exactly like the nostr-mls-sqlite-storage crate but with sqlcipher support.

IMO this should be done using features in the nostr-mls-sqlite-storage crate. Something like this:

[features]
default = ["bundled"]
bundled = ["rusqlite/bundled"]
sqlcipher = ["rusqlite/sqlcipher"]
bundled-sqlcipher = ["rusqlite/bundled-sqlcipher"]
# ...

The sqlcipher and bundled-sqlcipher would enable additional methods, like:

impl NostrMlsSqliteStorage {
    #[cfg(any(feature = "sqlcipher", feature = "bundled-sqlcipher"))]
    pub fn new_encrypted<P, S>(file_path: P, password: S) -> Result<Self, Error>
    where
        P: AsRef<Path>,
        S: AsRef<&str>,
    {
        // ...
    }
}

The same for the change_password and is_encrypted (and other sqlcipher methods if I missed them).

What do you think?

@erskingardner

@erskingardner
Copy link
Contributor

I'm totally ok with that. I couldn't tell how much there was different. But if it's just a dependency change and a few methods let's go with a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants