ATLAS Offline Software
graphics
VP1
VP1Gui
VP1Gui
VP1MD5Sum.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
7
// //
8
// Header file for class VP1MD5Sum //
9
// //
10
// Description: Calculates md5sum of file without reading //
11
// entire file into memory at once. //
12
// //
13
// Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
14
// Initial version: May 2008 //
15
// //
17
18
#ifndef VP1MD5SUM_H
19
#define VP1MD5SUM_H
20
21
#include <QString>
22
#include <QByteArray>
23
24
class
VP1MD5Sum
{
25
public
:
26
27
static
QByteArray
sum
(
const
QString&
filename
);
28
//Returns empty array in case of errors
29
30
static
bool
sumMatches
(
const
QString&
filename
,
const
QByteArray& md5sum );
31
static
bool
sumMatches
(
const
QString&
filename
,
const
QString& md5sum );
32
//Returns false in case of errors (missing or unreadable file/empty md5sum) or mismatch.
33
34
//We always assume sums in byte arrays to be raw bits, and sums in
35
//strings to be in hex format. Here are methods for
36
//conversion/sanity checking:
37
static
QString
sumToString
(
const
QByteArray& );
38
static
QByteArray
sumToByteArray
(
const
QString& );
39
static
bool
validMD5Sum
(
const
QString&);
//Does string have correct length and contain no invalid characters?
40
static
QString
sumToStandardFormat
(
const
QString&);
//Removes spaces converts to lower case.
41
private
:
42
class
Imp
;
43
VP1MD5Sum
();
44
~VP1MD5Sum
();
45
};
46
47
#endif
VP1MD5Sum::sum
static QByteArray sum(const QString &filename)
Definition:
VP1MD5Sum.cxx:28
VP1MD5Sum
Definition:
VP1MD5Sum.h:24
VP1MD5Sum::validMD5Sum
static bool validMD5Sum(const QString &)
Definition:
VP1MD5Sum.cxx:88
VP1MD5Sum::VP1MD5Sum
VP1MD5Sum()
VP1MD5Sum::~VP1MD5Sum
~VP1MD5Sum()
VP1MD5Sum::sumMatches
static bool sumMatches(const QString &filename, const QByteArray &md5sum)
Definition:
VP1MD5Sum.cxx:38
VP1MD5Sum::sumToString
static QString sumToString(const QByteArray &)
Definition:
VP1MD5Sum.cxx:76
VP1MD5Sum::sumToStandardFormat
static QString sumToStandardFormat(const QString &)
Definition:
VP1MD5Sum.cxx:96
VP1MD5Sum::sumToByteArray
static QByteArray sumToByteArray(const QString &)
Definition:
VP1MD5Sum.cxx:82
CaloCellTimeCorrFiller.filename
filename
Definition:
CaloCellTimeCorrFiller.py:24
VP1MD5Sum::Imp
Definition:
VP1MD5Sum.cxx:21
Generated on Mon Dec 23 2024 21:22:52 for ATLAS Offline Software by
1.8.18