QSMP: Quantum Secure Messaging Protocol 1.3.0.0a (A3)
A quantum secure encrypted tunneling protocol
logger.h
Go to the documentation of this file.
1/* 2025 Quantum Resistant Cryptographic Solutions Corporation
2 * All Rights Reserved.
3 *
4 * NOTICE: This software and all accompanying materials are the exclusive
5 * property of Quantum Resistant Cryptographic Solutions Corporation (QRCS).
6 * The intellectual and technical concepts contained within this implementation
7 * are proprietary to QRCS and its authorized licensors and are protected under
8 * applicable U.S. and international copyright, patent, and trade secret laws.
9 *
10 * CRYPTOGRAPHIC STANDARDS:
11 * - This software includes implementations of cryptographic algorithms such as
12 * SHA3, AES, and others. These algorithms are public domain or standardized
13 * by organizations such as NIST and are NOT the property of QRCS.
14 * - However, all source code, optimizations, and implementations in this library
15 * are original works of QRCS and are protected under this license.
16 *
17 * RESTRICTIONS:
18 * - Redistribution, modification, or unauthorized distribution of this software,
19 * in whole or in part, is strictly prohibited.
20 * - This software is provided for non-commercial, educational, and research
21 * purposes only. Commercial use in any form is expressly forbidden.
22 * - Licensing and authorized distribution are solely at the discretion of QRCS.
23 * - Any use of this software implies acceptance of these restrictions.
24 *
25 * DISCLAIMER:
26 * This software is provided "as is," without warranty of any kind, express or
27 * implied, including but not limited to warranties of merchantability or fitness
28 * for a particular purpose. QRCS disclaims all liability for any direct, indirect,
29 * incidental, or consequential damages resulting from the use or misuse of this software.
30 *
31 * FULL LICENSE:
32 * This software is subject to the **Quantum Resistant Cryptographic Solutions
33 * Proprietary License (QRCS-PL)**. The complete license terms are included
34 * in the LICENSE.txt file distributed with this software.
35 *
36 * Written by: John G. Underhill
37 * Contact: john.underhill@protonmail.com
38 */
39
40#ifndef QSMP_LOGGER_H
41#define QSMP_LOGGER_H
42
43#include "common.h"
44
64
71#define QSMP_LOGGING_MESSAGE_MAX 256
72
79static const char QSMP_LOGGER_PATH[] = "QSMP";
80
87static const char QSMP_LOGGER_FILE[] = "qsmp.log";
88
95static const char QSMP_LOGGER_HEAD[] = "QSMP Version 1.1a";
96
105bool qsmp_logger_exists(void);
106
116void qsmp_logger_initialize(const char* path);
117
125void qsmp_logger_print(void);
126
137void qsmp_logger_read(char* output, size_t otplen);
138
146void qsmp_logger_reset(void);
147
156size_t qsmp_logger_size(void);
157
169bool qsmp_logger_write(const char* message);
170
187bool qsmp_logger_test(void);
188
189#endif
void qsmp_logger_read(char *output, size_t otplen)
Read the QSMP log file into a provided buffer.
Definition logger.c:100
void qsmp_logger_print(void)
Print the contents of the QSMP log file.
Definition logger.c:75
bool qsmp_logger_test(void)
Run a manual test of the QSMP logger functions.
Definition logger.c:173
bool qsmp_logger_write(const char *message)
Write a message to the QSMP log file.
Definition logger.c:147
void qsmp_logger_initialize(const char *path)
Initialize the QSMP logger.
Definition logger.c:33
bool qsmp_logger_exists(void)
Check if the QSMP log file exists.
Definition logger.c:61
size_t qsmp_logger_size(void)
Get the current size of the QSMP log file.
Definition logger.c:133
void qsmp_logger_reset(void)
Reset the QSMP log.
Definition logger.c:112