Medial Code Documentation
Loading...
Searching...
No Matches
Internal
MedUtils
MedUtils
MedCrypt.h
1
#pragma once
2
//
3
// MedCrypt contains tools to sign files and test them, and to encrypt/decrypt files
4
// Main usage: to enable a library to build basic anti-tamperting mechanisms.
5
//
6
#include <string>
7
#include <vector>
8
#include <sstream>
9
10
using namespace
std
;
11
12
class
MedSignFiles
13
{
14
public
:
15
int
get_signature(
const
string
&fname,
const
string
& signature_type,
string
&out_signature);
16
17
static
int
calc_md5(
const
vector<char> &in,
string
&md5_out);
18
19
// helpers
20
static
int
read_file_to_char_vec(
const
string
&fname, vector<char> &data);
21
22
static
string
int_to_hex(
int
i)
23
{
24
std::stringstream stream;
25
//stream << std::setfill('0') << std::setw(sizeof(int)*2) << std::hex << i;
26
stream << std::hex << i;
27
return
stream.str();
28
}
29
30
31
32
};
MedSignFiles
Definition
MedCrypt.h:13
std
Definition
StdDeque.h:58
Generated on Mon Sep 15 2025 12:12:22 for Medial Code Documentation by
1.9.8