crypto_backend.h: Wrap APIs in extern C

It's a good practice to mark public APIs as extern "C" so that
projects written in C++ can use our library.

[mbroz] It is not public API in cryptsetup, but we use this backend
in other projects, this aligns the code changes.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik
2024-10-17 10:42:55 +02:00
committed by Milan Broz
parent b7cf60f229
commit fb04611ff7

View File

@@ -21,6 +21,10 @@
#define char16_t uint16_t
#endif
# ifdef __cplusplus
extern "C" {
# endif
struct crypt_hash;
struct crypt_hmac;
struct crypt_cipher;
@@ -143,4 +147,8 @@ int crypt_backend_memeq(const void *m1, const void *m2, size_t n);
/* crypto backend running in FIPS mode */
bool crypt_fips_mode(void);
# ifdef __cplusplus
}
# endif
#endif /* _CRYPTO_BACKEND_H */