]> git.sesse.net Git - bcachefs-tools-debian/blob - crypto.h
Add commands for changing and removing passphrase
[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 void bch2_passphrase_check(struct bch_sb *, const char *,
16                            struct bch_key *, struct bch_encrypted_key *);
17 void bch2_add_key(struct bch_sb *, const char *);
18 void bch_sb_crypt_init(struct bch_sb *sb, struct bch_sb_field_crypt *,
19                        const char *);
20
21 #endif /* _CRYPTO_H */