libzypp
17.14.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Digest.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
15
#ifndef ZYPP_MEDIA_DIGEST_H
16
#define ZYPP_MEDIA_DIGEST_H
17
18
#include <string>
19
#include <iosfwd>
20
#include <vector>
21
22
#include "
zypp/Callback.h
"
23
#include "
zypp/Pathname.h
"
24
25
namespace
zypp {
26
27
28
struct
DigestReport
:
public
callback::ReportBase
29
{
30
virtual
bool
askUserToAcceptNoDigest
(
const
zypp::Pathname &file );
31
virtual
bool
askUserToAccepUnknownDigest
(
const
Pathname &file,
const
std::string &name );
32
virtual
bool
askUserToAcceptWrongDigest
(
const
Pathname &file,
const
std::string &requested,
const
std::string &found );
33
};
34
35
36
45
class
Digest
46
{
47
private
:
48
class
P
;
49
P
*
_dp
;
50
51
// disabled
52
Digest
(
const
Digest
& d);
53
// disabled
54
const
Digest
&
operator=
(
const
Digest
& d);
55
56
public
:
60
static
const
std::string &
md5
();
62
static
const
std::string &
sha1
();
64
static
const
std::string &
sha224
();
66
static
const
std::string &
sha256
();
68
static
const
std::string &
sha384
();
70
static
const
std::string &
sha512
();
72
73
public
:
74
Digest
();
75
~Digest
();
76
90
bool
create
(
const
std::string&
name
);
91
93
const
std::string&
name
();
94
100
bool
update
(
const
char
* bytes,
size_t
len);
101
109
std::string
digest
();
110
118
std::vector<unsigned char>
digestVector
();
119
125
bool
reset
();
126
137
static
std::string
digest
(
const
std::string&
name
, std::istream& is,
size_t
bufsize = 4096);
138
140
static
std::string
digest
(
const
std::string &
name
,
const
std::string & input,
size_t
bufsize = 4096 );
141
};
142
143
}
// namespace zypp
144
145
#endif
zypp
Digest.h
Generated by
1.8.2