1
0

secure_input.h 419 B

12345678910111213141516
  1. #ifndef __SECURE_INPUT_H__
  2. #define __SECURE_INPUT_H__
  3. #include <sys/types.h>
  4. /**
  5. * Read string from standard input while hiding the input. The read
  6. * input is returned in 'buf' as a \0 terminated string. The maximum string
  7. * length will be 'buf_size' - 1.
  8. *
  9. * @param buf target buffer
  10. * @param buf_size Size of the target buffer
  11. */
  12. void secure_input(char *buf, size_t buf_size);
  13. #endif // __SECURE_INPUT_H__