mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
feat(big): add SBigXor
This commit is contained in:
parent
619317c34f
commit
208dd8a2a5
5 changed files with 63 additions and 0 deletions
|
|
@ -482,3 +482,12 @@ void ToStream(TSGrowableArray<uint8_t>& output, const BigBuffer& buffer) {
|
|||
EncodeDataBytes(output, output.Count());
|
||||
ToBinaryAppend(output, buffer);
|
||||
}
|
||||
|
||||
void Xor(BigBuffer& a, const BigBuffer& b, const BigBuffer& c) {
|
||||
uint32_t i = 0;
|
||||
for (; b.IsUsed(i) || c.IsUsed(i); i++) {
|
||||
a[i] = c[i] ^ b[i];
|
||||
}
|
||||
|
||||
a.SetCount(i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue