Java Code Examples for org.whispersystems.signalservice.internal.push.SignalServiceProtos.SyncMessage#newBuilder()

The following examples show how to use org.whispersystems.signalservice.internal.push.SignalServiceProtos.SyncMessage#newBuilder() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SignalServiceMessageSender.java    From mollyim-android with GNU General Public License v3.0 5 votes vote down vote up
private SyncMessage.Builder createSyncMessageBuilder() {
  SecureRandom random  = new SecureRandom();
  byte[]       padding = Util.getRandomLengthBytes(512);
  random.nextBytes(padding);

  SyncMessage.Builder builder = SyncMessage.newBuilder();
  builder.setPadding(ByteString.copyFrom(padding));

  return builder;
}
 
Example 2
Source File: SignalServiceMessageSender.java    From libsignal-service-java with GNU General Public License v3.0 5 votes vote down vote up
private SyncMessage.Builder createSyncMessageBuilder() {
  SecureRandom random  = new SecureRandom();
  byte[]       padding = Util.getRandomLengthBytes(512);
  random.nextBytes(padding);

  SyncMessage.Builder builder = SyncMessage.newBuilder();
  builder.setPadding(ByteString.copyFrom(padding));

  return builder;
}