WPILibC++
2020.3.2
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_WPI_SHA1_H_
21
#define WPIUTIL_WPI_SHA1_H_
22
23
#include <stdint.h>
24
25
#include <string>
26
27
#include "wpi/StringRef.h"
28
29
namespace
wpi
{
30
template
<
typename
T>
31
class
SmallVectorImpl
;
32
class
raw_istream
;
33
34
class
SHA1
{
35
public
:
36
SHA1
();
37
void
Update(
StringRef
s);
38
void
Update(
raw_istream
& is);
39
std::string Final();
40
StringRef
Final(
SmallVectorImpl<char>
& buf);
41
StringRef
RawFinal(
SmallVectorImpl<char>
& buf);
42
static
std::string FromFile(
StringRef
filename);
43
44
private
:
45
uint32_t digest[5];
46
unsigned
char
buffer[64];
47
size_t
buf_size;
48
uint64_t transforms;
49
};
50
51
}
// namespace wpi
52
53
#endif // WPIUTIL_WPI_SHA1_H_
wpi::SHA1
Definition:
sha1.h:34
wpi::SmallVectorImpl
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition:
sha1.h:31
wpi::raw_istream
Definition:
raw_istream.h:26
wpi
WPILib C++ utilities (wpiutil) namespace.
Definition:
EventLoopRunner.h:17
wpi::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:
StringRef.h:49
wpiutil
src
main
native
include
wpi
sha1.h
Generated on Fri Feb 21 2020 08:50:37 for WPILibC++ by
1.8.16