Allow to skip malleability check when deserializing BLS primitives
Useful when many sigs need to be deserialized and at the same time the hash of these is never used.
This commit is contained in:
parent
9d25bb1d8f
commit
c6be8cfcd6
@ -165,13 +165,15 @@ public:
|
||||
// }
|
||||
}
|
||||
template <typename Stream>
|
||||
inline void Unserialize(Stream& s)
|
||||
inline void Unserialize(Stream& s, bool checkMalleable = true)
|
||||
{
|
||||
char buf[SerSize];
|
||||
s.read((char*)buf, SerSize);
|
||||
SetBuf(buf, SerSize);
|
||||
|
||||
CheckMalleable(buf, SerSize);
|
||||
if (checkMalleable) {
|
||||
CheckMalleable(buf, SerSize);
|
||||
}
|
||||
}
|
||||
|
||||
inline void CheckMalleable(void* buf, size_t size) const
|
||||
|
Loading…
Reference in New Issue
Block a user