Note values should be little-endian byte order.
This commit is contained in:
12
src/zcash/util.cpp
Normal file
12
src/zcash/util.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user