Note values should be little-endian byte order.

This commit is contained in:
Sean Bowe
2016-05-12 13:19:13 -06:00
parent 032164d5d5
commit 81469bbb83
8 changed files with 129 additions and 10 deletions

12
src/zcash/util.cpp Normal file
View File

@@ -0,0 +1,12 @@
#include "zcash/util.h"
#include <algorithm>
std::vector<unsigned char> convertIntToVectorLE(const uint64_t val_int) {
std::vector<unsigned char> bytes;
for(size_t i = 0; i < 8; i++) {
bytes.push_back(val_int >> (i * 8));
}
return bytes;
}