feat(big): add SBigToUnsigned

This commit is contained in:
Adam Heinermann 2024-11-17 04:02:44 -08:00 committed by fallenoak
parent 208dd8a2a5
commit aaa44dd400
6 changed files with 37 additions and 1 deletions

View file

@ -483,6 +483,11 @@ void ToStream(TSGrowableArray<uint8_t>& output, const BigBuffer& buffer) {
ToBinaryAppend(output, buffer);
}
void ToUnsigned(uint32_t* a, const BigBuffer& b) {
*a = 0;
*a = b[0];
}
void Xor(BigBuffer& a, const BigBuffer& b, const BigBuffer& c) {
uint32_t i = 0;
for (; b.IsUsed(i) || c.IsUsed(i); i++) {

View file

@ -75,6 +75,8 @@ void ToBinary(TSGrowableArray<uint8_t>& output, const BigBuffer& buffer);
void ToStream(TSGrowableArray<uint8_t>& output, const BigBuffer& buffer);
void ToUnsigned(uint32_t* a, const BigBuffer& b);
void Xor(BigBuffer& a, const BigBuffer& b, const BigBuffer& c);
#endif