Mercurial > vim
annotate src/proto/crypt.pro @ 32669:448aef880252
normalize line endings
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 26 Jun 2023 09:54:34 +0200 |
parents | 5d07e7e9580f |
children | 695b50472e85 |
rev | line source |
---|---|
32669
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
1 /* crypt.c */ |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
2 int sodium_enabled(int verbose); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
3 int crypt_method_nr_from_name(char_u *name); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
4 int crypt_method_nr_from_magic(char *ptr, int len); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
5 int crypt_works_inplace(cryptstate_T *state); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
6 int crypt_get_method_nr(buf_T *buf); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
7 int crypt_method_is_sodium(int method); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
8 int crypt_whole_undofile(int method_nr); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
9 int crypt_get_header_len(int method_nr); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
10 int crypt_get_max_header_len(void); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
11 void crypt_set_cm_option(buf_T *buf, int method_nr); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
12 int crypt_self_test(void); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
13 cryptstate_T *crypt_create(int method_nr, char_u *key, crypt_arg_T *crypt_arg); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
14 cryptstate_T *crypt_create_from_header(int method_nr, char_u *key, char_u *header); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
15 cryptstate_T *crypt_create_from_file(FILE *fp, char_u *key); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
16 cryptstate_T *crypt_create_for_writing(int method_nr, char_u *key, char_u **header, int *header_len); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
17 void crypt_free_state(cryptstate_T *state); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
18 long crypt_encode_alloc(cryptstate_T *state, char_u *from, size_t len, char_u **newptr, int last); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
19 long crypt_decode_alloc(cryptstate_T *state, char_u *ptr, long len, char_u **newptr, int last); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
20 void crypt_encode(cryptstate_T *state, char_u *from, size_t len, char_u *to, int last); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
21 void crypt_encode_inplace(cryptstate_T *state, char_u *buf, size_t len, int last); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
22 void crypt_decode_inplace(cryptstate_T *state, char_u *buf, size_t len, int last); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
23 void crypt_free_key(char_u *key); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
24 void crypt_check_method(int method); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
25 void crypt_check_swapfile_curbuf(void); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
26 void crypt_check_current_method(void); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
27 char_u *crypt_get_key(int store, int twice); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
28 void crypt_append_msg(buf_T *buf); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
29 int crypt_sodium_munlock(void *const addr, const size_t len); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
30 void crypt_sodium_randombytes_buf(void *const buf, const size_t size); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
31 int crypt_sodium_init(void); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
32 uint32_t crypt_sodium_randombytes_random(void); |
448aef880252
normalize line endings
Christian Brabandt <cb@256bit.org>
parents:
32503
diff
changeset
|
33 /* vim: set ft=c : */ |