WPILibC++
unspecified
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
sha1.h
1
/*
2
sha1.hpp - header of
3
4
============
5
SHA-1 in C++
6
============
7
8
100% Public Domain.
9
10
Original C Code
11
-- Steve Reid <steve@edmweb.com>
12
Small changes to fit into bglibs
13
-- Bruce Guenter <bruce@untroubled.org>
14
Translation to simpler C++ Code
15
-- Volker Grabsch <vog@notjusthosting.com>
16
Safety fixes
17
-- Eugene Hopkinson <slowriot at voxelstorm dot com>
18
*/
19
20
#ifndef WPIUTIL_SUPPORT_SHA1_H_
21
#define WPIUTIL_SUPPORT_SHA1_H_
22
23
#include <stdint.h>
24
25
#include <string>
26
27
#include "llvm/StringRef.h"
28
29
namespace
llvm
{
30
template
<
typename
T>
31
class
SmallVectorImpl;
32
}
// namespace llvm
33
34
namespace
wpi
{
35
36
class
raw_istream;
37
38
class
SHA1
{
39
public
:
40
SHA1
();
41
void
Update(
llvm::StringRef
s);
42
void
Update(
raw_istream
& is);
43
std::string Final();
44
llvm::StringRef
Final(
llvm::SmallVectorImpl<char>
& buf);
45
static
std::string FromFile(
llvm::StringRef
filename);
46
47
private
:
48
uint32_t digest[5];
49
unsigned
char
buffer[64];
50
size_t
buf_size;
51
uint64_t transforms;
52
};
53
54
}
// namespace wpi
55
56
#endif // WPIUTIL_SUPPORT_SHA1_H_
llvm
Definition:
Path.inc:31
llvm::SmallVectorImpl< char >
wpi
Definition:
SocketError.cpp:17
wpi::raw_istream
Definition:
raw_istream.h:21
wpi::SHA1
Definition:
sha1.h:38
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:42
build
cppSource
wpiutil-cpp
headers
support
sha1.h
Generated on Mon Jan 29 2018 16:02:21 for WPILibC++ by
1.8.11