aboutsummaryrefslogtreecommitdiffstats
path: root/src/constructs/tss
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-15 13:44:42 +0000
committerlloyd <[email protected]>2010-09-15 13:44:42 +0000
commit180c5358cb31e9c003cada3705bb30cf01732878 (patch)
tree951038dfaf2c33bcee5e27c4b1d2980eb35494a3 /src/constructs/tss
parenta9d0f37596e5413cae45f32740738c5c68abcce1 (diff)
Update all uses of MemoryRegion::append to use either push_back or operator+=
Diffstat (limited to 'src/constructs/tss')
-rw-r--r--src/constructs/tss/tss.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/constructs/tss/tss.cpp b/src/constructs/tss/tss.cpp
index 644e8d857..e5c245873 100644
--- a/src/constructs/tss/tss.cpp
+++ b/src/constructs/tss/tss.cpp
@@ -138,20 +138,20 @@ RTSS_Share::split(byte M, byte N,
// Create RTSS header in each share
for(byte i = 0; i != N; ++i)
{
- shares[i].contents.append(identifier, 16);
- shares[i].contents.append(rtss_hash_id(hash.name()));
- shares[i].contents.append(M);
- shares[i].contents.append(get_byte(0, S_len));
- shares[i].contents.append(get_byte(1, S_len));
+ shares[i].contents += std::make_pair(identifier, 16);
+ shares[i].contents += rtss_hash_id(hash.name());
+ shares[i].contents += M;
+ shares[i].contents += get_byte(0, S_len);
+ shares[i].contents += get_byte(1, S_len);
}
// Choose sequential values for X starting from 1
for(byte i = 0; i != N; ++i)
- shares[i].contents.append(i+1);
+ shares[i].contents.push_back(i+1);
// secret = S || H(S)
SecureVector<byte> secret(S, S_len);
- secret.append(hash.process(S, S_len));
+ secret += hash.process(S, S_len);
for(size_t i = 0; i != secret.size(); ++i)
{
@@ -171,7 +171,7 @@ RTSS_Share::split(byte M, byte N,
X_i = gfp_mul(X_i, X);
}
- shares[j].contents.append(sum);
+ shares[j].contents.push_back(sum);
}
}
@@ -241,7 +241,7 @@ RTSS_Share::reconstruct(const std::vector<RTSS_Share>& shares)
r ^= gfp_mul(V[k], r2);
}
- secret.append(r);
+ secret.push_back(r);
}
if(secret.size() != secret_len + hash->OUTPUT_LENGTH)