]> git.sesse.net Git - bcachefs-tools-debian/blob - crypto.h
convert main() from C to Rust
[bcachefs-tools-debian] / crypto.h
1 #ifndef _CRYPTO_H
2 #define _CRYPTO_H
3
4 #include "tools-util.h"
5
6 struct bch_sb;
7 struct bch_sb_field_crypt;
8 struct bch_key;
9 struct bch_encrypted_key;
10
11 char *read_passphrase(const char *);
12 char *read_passphrase_twice(const char *);
13
14 struct bch_key derive_passphrase(struct bch_sb_field_crypt *, const char *);
15 bool bch2_sb_is_encrypted(struct bch_sb *);
16 void bch2_passphrase_check(struct bch_sb *, const char *,
17                            struct bch_key *, struct bch_encrypted_key *);
18 void bch2_add_key(struct bch_sb *, const char *, const char *, const char *);
19 void bch_sb_crypt_init(struct bch_sb *sb, struct bch_sb_field_crypt *,
20                        const char *);
21
22 #endif /* _CRYPTO_H */