Twitch SDK (Internal)
modules
core
core_common
include
twitchsdk
core
sha1.h
Go to the documentation of this file.
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
#pragma once
21
22
#include <cstdint>
23
#include <iostream>
24
#include <string>
25
26
namespace
ttv
27
{
28
class
SHA1;
29
}
30
31
class
ttv::SHA1
32
{
33
public
:
34
SHA1
();
35
void
Update
(
const
std::string &s);
36
void
Update
(std::istream &is);
37
std::string
Final
();
38
39
static
uint32_t
HashAsUInt32
(
const
std::string& hash);
40
41
private
:
42
uint32_t
digest
[5];
43
std::string
buffer
;
44
uint64_t
transforms
;
45
};
ttv::SHA1::transforms
uint64_t transforms
Definition:
sha1.h:44
ttv::SHA1
Definition:
sha1.h:31
ttv::SHA1::HashAsUInt32
static uint32_t HashAsUInt32(const std::string &hash)
ttv
JSON (JavaScript Object Notation).
Definition:
adsapi.h:16
ttv::SHA1::buffer
std::string buffer
Definition:
sha1.h:43
ttv::SHA1::SHA1
SHA1()
ttv::SHA1::Final
std::string Final()
ttv::SHA1::Update
void Update(const std::string &s)
ttv::SHA1::digest
uint32_t digest[5]
Definition:
sha1.h:42
Generated by
1.8.13