mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Improvements to protocol serialization:
A few serialization changes coming from m-of-n development: o Improve readability of SField.cpp. o Better initialization of STObject. o Trimming of STObject public methods. o Add STObject::getFieldObject and STObject::setFieldObject. o Make STObject::isEquivalent more robust. o Improvements to whitespace, overrides, and virtuals.
This commit is contained in:
committed by
Vinnie Falco
parent
2f3834359e
commit
92799187ed
@@ -27,7 +27,7 @@ sign (STObject& st, HashPrefix const& prefix,
|
||||
{
|
||||
Serializer ss;
|
||||
ss.add32(prefix);
|
||||
st.add(ss, false);
|
||||
st.addWithoutSigningFields(ss);
|
||||
set(st, sfSignature,
|
||||
sk.sign(ss.data(), ss.size()));
|
||||
}
|
||||
@@ -42,7 +42,7 @@ verify (STObject const& st,
|
||||
return false;
|
||||
Serializer ss;
|
||||
ss.add32(prefix);
|
||||
st.add(ss, false);
|
||||
st.addWithoutSigningFields(ss);
|
||||
return pk.verify(
|
||||
ss.data(), ss.size(),
|
||||
sig->data(), sig->size());
|
||||
|
||||
Reference in New Issue
Block a user