You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Distributed under the MIT software license, see the accompanying
4
+
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Distributed under the MIT software license, see the accompanying
4
+
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+
6
+
/*
7
+
// Zcash uses SHA256Compress as a PRF for various components
// Distributed under the MIT software license, see the accompanying
4
+
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+
6
+
#ifndef UINT252_H
7
+
#defineUINT252_H
8
+
9
+
#include<vector>
10
+
#include"uint256.h"
11
+
#include"serialize.h"
12
+
13
+
// Wrapper of uint256 with guarantee that first
14
+
// four bits are zero.
15
+
classuint252 {
16
+
private:
17
+
uint256 contents;
18
+
19
+
public:
20
+
ADD_SERIALIZE_METHODS;
21
+
22
+
template <typename Stream, typename Operation>
23
+
inlinevoidSerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
24
+
READWRITE(contents);
25
+
26
+
if ((*contents.begin()) & 0xF0) {
27
+
throwstd::ios_base::failure("spending key has invalid leading bits");
0 commit comments