- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.cpp
More file actions
Latest commit
22 lines (19 loc) · 540 Bytes
/
Copy pathexample.cpp
File metadata and controls
22 lines (19 loc) · 540 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<algorithm>
#include<array>
#include<cstdint>
#include<iostream>
#include<random>
#include<string>
#include"halftime-hash.hpp"
usingnamespacestd;
intmain() {
array<uint64_t, halftime_hash::kEntropyBytesNeeded / sizeof(uint64_t)> entropy;
generate(entropy.begin(), entropy.end(), mt19937_64{});
string input;
while (cin >> input) {
cout << hex
<< halftime_hash::HalftimeHashStyle512(entropy.data(), input.data(),
input.size())
<< endl;
}
}