diff options
author | jayesbee <jesse.badwal@gmail.com> | 2014-07-29 06:02:02 -0400 |
---|---|---|
committer | jayesbee <jesse.badwal@gmail.com> | 2014-07-29 06:02:02 -0400 |
commit | 7c0ecdae2856ffe33647c5a6b54b73da6c55a9f6 (patch) | |
tree | 34d462518cf8f82a4b327b5503fc92c0f81e481e /libscrypt.h | |
parent | f824462cdb8cd09b696ebe24bd3f57b2eb977758 (diff) |
allow the library to be used in C++ applications.
I don't know if I could have done this external to modifying libscrypt.h
Diffstat (limited to 'libscrypt.h')
-rw-r--r-- | libscrypt.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libscrypt.h b/libscrypt.h index e25b86c..318576e 100644 --- a/libscrypt.h +++ b/libscrypt.h @@ -6,6 +6,10 @@ #include <stdint.h> +#ifdef __cplusplus +extern "C"{ +#endif + /** * crypto_scrypt(passwd, passwdlen, salt, saltlen, N, r, p, buf, buflen): * Compute scrypt(passwd[0 .. passwdlen - 1], salt[0 .. saltlen - 1], N, r, @@ -42,6 +46,10 @@ int libscrypt_hash(char *dst, const char* passphrase, uint32_t N, uint8_t r, uint8_t p); +#ifdef __cplusplus +} +#endif + /* Sane default values */ #define SCRYPT_HASH_LEN 64 /* This can be user defined - *but 64 is the reference size |