Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
sha1.cc
Go to the documentation of this file.
1
#include "
cetlib/sha1.h
"
2
3
using
cet::sha1
;
4
5
sha1::sha1()
6
{
7
reset
();
8
}
9
10
sha1::sha1
(
std::string
const
& mesg)
11
{
12
reset
();
13
operator<<
(mesg);
14
}
15
16
sha1::sha1
(
char
const
mesg)
17
{
18
reset
();
19
operator<<
(mesg);
20
}
21
22
void
23
sha1::reset
()
24
{
25
SHA1_Init(&
context
);
26
}
27
28
sha1
&
29
sha1::operator<<
(
std::string
const
& mesg)
30
{
31
auto
data
=
reinterpret_cast<
uchar
const
*
>
(&mesg[0]);
32
SHA1_Update(&
context
,
data
, mesg.size());
33
return
*
this
;
34
}
35
36
sha1
&
37
sha1::operator<<
(
char
const
mesg)
38
{
39
auto
data
=
reinterpret_cast<
uchar
const
*
>
(&mesg);
40
SHA1_Update(&
context
,
data
, 1u);
41
return
*
this
;
42
}
43
44
sha1::digest_t
45
sha1::digest
()
46
{
47
digest_t
result
{{}};
48
SHA1_Final(&
result
[0], &
context
);
49
return
result
;
50
}
freeze_graph.const
const
Definition:
freeze_graph.py:179
cet::sha1::uchar
unsigned char uchar
Definition:
sha1.h:29
result
static QCString result
Definition:
fortranscanner.cpp:56614
string
std::string string
Definition:
nybbler.cc:12
cet::sha1
Definition:
sha1.h:26
cet::sha1::digest_t
std::array< uchar, digest_sz > digest_t
Definition:
sha1.h:30
cet::sha1::sha1
sha1()
Definition:
sha1.cc:5
cet::sha1::context
SHA_CTX context
Definition:
sha1.h:43
cet::sha1::digest
digest_t digest()
Definition:
sha1.cc:45
make_THn_beam_input.data
data
Definition:
make_THn_beam_input.py:80
sha1.h
cet::sha1::operator<<
sha1 & operator<<(std::string const &mesg)
Definition:
sha1.cc:29
cet::sha1::reset
void reset()
Definition:
sha1.cc:23
Generated by
1.8.11