OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
checksum.h
Go to the documentation of this file.
1//Copyright> OpenRadioss
2//Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3//Copyright>
4//Copyright> This program is free software: you can redistribute it and/or modify
5//Copyright> it under the terms of the GNU Affero General Public License as published by
6//Copyright> the Free Software Foundation, either version 3 of the License, or
7//Copyright> (at your option) any later version.
8//Copyright>
9//Copyright> This program is distributed in the hope that it will be useful,
10//Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11//Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12//Copyright> GNU Affero General Public License for more details.
13//Copyright>
14//Copyright> You should have received a copy of the GNU Affero General Public License
15//Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16//Copyright>
17//Copyright>
18//Copyright> Commercial Alternative: Altair Radioss Software
19//Copyright>
20//Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21//Copyright> software under a commercial license. Contact Altair to discuss further if the
22//Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23#include <iostream>
24#include <iomanip>
25#include <fstream>
26#include <string>
27#include <list>
28#include <stdio.h>
29#include <stdlib.h>
30#include <sstream>
31#include <string.h>
32#include <tuple>
33#include <filesystem>
34#include <algorithm>
35
36#include <md5.h>
37
38#define _FCALL
39#define BUFFERSIZE 4096
40
41class checksum {
42private:
43 std::list <std::tuple< std::string, std::string>> checksum_list; // List of checksums : Filename, checksum
44public:
45 std::string compute_checksum(std::string file);
46 std::list <std::tuple< std::string, std::string>> dump_list();
47};
48
49
50#ifdef _WIN64
51#define write_out_file WRITE_OUT_FILE
52#else
53#define write_out_file write_out_file_
54#endif
55
56extern "C" {
58 void compute_binary_checksum(checksum* cs_output_files,char *file, int len , int izip);
59 void print_checksum_list( checksum* cs_output_files,int fd);
60 void write_out_file(int * fd,const char * line,int * len_line);
61}
checksum * new_file_checksum_list()
Definition checksum.cpp:73
#define write_out_file
Definition checksum.h:53
void print_checksum_list(checksum *cs_output_files, int fd)
Definition checksum.cpp:95
void compute_binary_checksum(checksum *cs_output_files, char *file, int len, int izip)
Definition checksum.cpp:78
std::string compute_checksum(std::string file)
Definition checksum.cpp:25
std::list< std::tuple< std::string, std::string > > dump_list()
Definition checksum.cpp:62
std::list< std::tuple< std::string, std::string > > checksum_list
Definition checksum.h:43