mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
feat(big): add SBigToUnsigned
This commit is contained in:
parent
208dd8a2a5
commit
aaa44dd400
6 changed files with 37 additions and 1 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue