/* BSD-2-Clause license * * Copyright (c) 2018-2023 NST , sss . * */ #pragma once /* check if destination path is regular file */ bool is_regular_file(const char *path); /* check if destination path is directory */ bool is_directory(const char *path); /* calculate sha1 hash of src */ bool sha1(uint8_t *dst, const uint8_t *src, size_t src_length); /* print hex representation of buf to stdout */ void hex_print(const uint8_t *buf, size_t buf_len); /* get one random ascii character */ char random_ascii_character(); /* get random string of ascii characters with length of 'len' * and store intopointed buffer */ char *random_ascii_string(char *buf, const size_t buf_size); void random_bytes(uint8_t *buf, size_t buf_len);