X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fcipher.h;h=45a4fc5a0ee1f61fd3806cd610025858e8ddb585;hb=f42e57f663a2663c830c4fb4c01927c2d3c89c09;hp=522d7fb757b491af33c8f3a4c4a231bcb5772f75;hpb=19413a8048fd851866c551ab8035f008f0c7e806;p=tinc diff --git a/src/cipher.h b/src/cipher.h index 522d7fb7..45a4fc5a 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -32,13 +32,18 @@ typedef struct cipher { uint16_t blklen; } cipher_t; -bool cipher_open_by_name(struct cipher *, const char *); -bool cipher_open_by_nid(struct cipher *, int); -bool cipher_open_blowfish_ofb(struct cipher *); -void cipher_close(struct cipher *); -bool cipher_regenerate_key(struct cipher *); -bool cipher_encrypt(struct cipher *, void *indata, size_t inlen, void *outdata, size_t *outlen); -bool cipher_decrypt(struct cipher *, void *indata, size_t inlen, void *outdata, size_t *outlen); -int cipher_get_nid(struct cipher *); +extern bool cipher_open_by_name(struct cipher *, const char *); +extern bool cipher_open_by_nid(struct cipher *, int); +extern bool cipher_open_blowfish_ofb(struct cipher *); +extern void cipher_close(struct cipher *); +extern size_t cipher_keylength(const struct cipher *); +extern void cipher_get_key(const struct cipher *, void *); +extern bool cipher_set_key(struct cipher *, void *); +extern bool cipher_regenerate_key(struct cipher *); +extern void cipher_reset(struct cipher *); +extern bool cipher_encrypt(struct cipher *, void *indata, size_t inlen, void *outdata, size_t *outlen); +extern bool cipher_decrypt(struct cipher *, void *indata, size_t inlen, void *outdata, size_t *outlen); +extern int cipher_get_nid(const struct cipher *); +extern bool cipher_active(const struct cipher *); #endif