1 /* 2 * Copyright 2023, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _GNU_CRYPT_H_ 6 #define _GNU_CRYPT_H_ 7 8 9 #include <features.h> 10 11 12 #ifdef _DEFAULT_SOURCE 13 14 15 #include <sys/types.h> 16 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 struct crypt_data { 23 int initialized; 24 char buf[512]; 25 }; 26 27 28 char *crypt_rn(const char *key, const char *salt, struct crypt_data *data, size_t size); 29 30 31 static inline char * 32 crypt_r(const char *key, const char *salt, struct crypt_data *data) 33 { 34 return crypt_rn(key, salt, data, sizeof(struct crypt_data)); 35 } 36 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 43 #endif 44 45 46 #endif /* _GNU_CRYPT_H_ */ 47