Fix pad_size type.
GitOrigin-RevId: 3ec3f1f14a3a54fc28131f3b4bc7bda383e3a704
This commit is contained in:
parent
97e6e99eaf
commit
8c45bd919e
|
@ -16,7 +16,7 @@ class NoCryptoImpl {
|
||||||
public:
|
public:
|
||||||
NoCryptoImpl(uint64 message_id, const Storer &data, bool need_pad = true) : message_id_(message_id), data_(data) {
|
NoCryptoImpl(uint64 message_id, const Storer &data, bool need_pad = true) : message_id_(message_id), data_(data) {
|
||||||
if (need_pad) {
|
if (need_pad) {
|
||||||
auto pad_size = -static_cast<int>(data_.size()) & 15;
|
size_t pad_size = -static_cast<int>(data_.size()) & 15;
|
||||||
pad_size += 16 * (static_cast<size_t>(Random::secure_int32()) % 16);
|
pad_size += 16 * (static_cast<size_t>(Random::secure_int32()) % 16);
|
||||||
pad_.resize(pad_size);
|
pad_.resize(pad_size);
|
||||||
Random::secure_bytes(pad_);
|
Random::secure_bytes(pad_);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user