Improve random bytes length.

This commit is contained in:
levlam 2021-07-19 19:32:56 +03:00
parent 061ca24be9
commit efc762360c

View File

@ -215,7 +215,7 @@ Result<BufferSlice> SecretChatActor::create_encrypted_message(int32 my_in_seq_no
auto out_seq_no = my_out_seq_no * 2 - 1 - auth_state_.x;
auto layer = current_layer();
BufferSlice random_bytes(32);
BufferSlice random_bytes(31);
Random::secure_bytes(random_bytes.as_slice().ubegin(), random_bytes.size());
auto message_with_layer = secret_api::make_object<secret_api::decryptedMessageLayer>(
std::move(random_bytes), layer, in_seq_no, out_seq_no, std::move(message));